使用owc怎么设置Y轴的起始值啊?

huankongzi 2007-09-22 01:00:48
使用owc怎么设置Y轴的起始值啊?
...全文
139 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
xp1056 2008-05-05
  • 打赏
  • 举报
回复
不好意思
string strCategory = "1" + "\t" + "2" + '\t' + "3" + '\t'+"4" + '\t' + "5" + '\t' + "6" + '\t';
应该是
string strCategory = "1" + "\t" + "2" + '\t' + "3" + '\t'+"4" + '\t' + "5" + '\t' + "6" + '\t';
xp1056 2008-05-05
  • 打赏
  • 举报
回复

.......以上省略
string strSeriesName = "图例 1";
string strCategory = "1" + "\t" + "2" + '\t' + "3" + '\t'+"4" + '\t' + "5" + '\t' + "6" + '\t';
string strValue = "9" + "\t" + "8" + '\t' + "4" + '\t'+"10" + '\t' + "12" + '\t' + "6" + '\t';

//添加一个series
objChart.SeriesCollection.Add(0);

//给定series的名字
objChart.SeriesCollection[0].SetData (Microsoft.Office.Interop.Owc11.ChartDimensionsEnum.chDimSeriesNames,
+ (int)Microsoft.Office.Interop.Owc11.ChartSpecialDataSourcesEnum.chDataLiteral, strSeriesName);

//给定分类
objChart.SeriesCollection[0].SetData (Microsoft.Office.Interop.Owc11.ChartDimensionsEnum.chDimCategories,
+ (int)Microsoft.Office.Interop.Owc11.ChartSpecialDataSourcesEnum.chDataLiteral, strCategory);

//给定值
objChart.SeriesCollection[0].SetData
(Microsoft.Office.Interop.Owc11.ChartDimensionsEnum.chDimValues,
(int)Microsoft.Office.Interop.Owc11.ChartSpecialDataSourcesEnum.chDataLiteral, strValue);
//输出成GIF文件.
string strAbsolutePath = (Server.MapPath(".")) + "\\test.gif";
objCSpace.ExportPicture(strAbsolutePath, "GIF", 600, 350);
......以下省略


string strCategory = "1" + "\t" + "2" + '\t' + "3" + '\t'+"4" + '\t' + "5" + '\t' + "6" + '\t';
代码中的红色部分就是你的起始值了,如果数据是从数据库中得来的,需要设定的话就在存储过程中添加处理就好了
soufre 2007-12-13
  • 打赏
  • 举报
回复
不用设啊,他会根据你的数据自己生成的
Eray 2007-11-27
  • 打赏
  • 举报
回复
OWC
OWC11下载网址
http://www.microsoft.com/downloads/details.aspx?familyid=7287252C-402E-4F72-97A5-E0FD290D4B76&displaylang=zh-cn
使用教程
http://blog.csdn.net/Eray/archive/2007/03/20/1534509.aspx

4,819

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧