C# 使用OWC生成图表
2009-06-11 08:32:00 来源:WEB开发网myChart.SeriesCollection[0].SetData(OWC10.ChartDimensionsEnum.chDimValues, (int)OWC10.ChartSpecialDataSourcesEnum.chDataLiteral, strValue);
//添加一个series
myChart.SeriesCollection.Add(1);
//给定series的名字
myChart.SeriesCollection[1].SetData(OWC10.ChartDimensionsEnum.chDimSeriesNames, (int)OWC10.ChartSpecialDataSourcesEnum.chDataLiteral, "出售");
//给定series的分类
myChart.SeriesCollection[1].SetData(OWC10.ChartDimensionsEnum.chDimCategories, (int)OWC10.ChartSpecialDataSourcesEnum.chDataLiteral, strCateory);
//给定具体值
myChart.SeriesCollection[1].SetData(OWC10.ChartDimensionsEnum.chDimValues, (int)OWC10.ChartSpecialDataSourcesEnum.chDataLiteral, strValue1);
//添加一个series
myChart.SeriesCollection.Add(2);
//给定series的名字
myChart.SeriesCollection[2].SetData(OWC10.ChartDimensionsEnum.chDimSeriesNames, (int)OWC10.ChartSpecialDataSourcesEnum.chDataLiteral, "总成交");
//给定series的分类
myChart.SeriesCollection[2].SetData(OWC10.ChartDimensionsEnum.chDimCategories, (int)OWC10.ChartSpecialDataSourcesEnum.chDataLiteral, strCateory);
//给定具体值
myChart.SeriesCollection[2].SetData(OWC10.ChartDimensionsEnum.chDimValues, (int)OWC10.ChartSpecialDataSourcesEnum.chDataLiteral, strValue2);
//输出成GIF文件
string strAbsolutePath = (Server.MapPath(".")) + @"\Images\tempChart.gif";
更多精彩
赞助商链接