博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
使用OWC 做图表时按周、月、年设置时间刻度是参数无效问题解决方法
阅读量:7060 次
发布时间:2019-06-28

本文共 1042 字,大约阅读时间需要 3 分钟。

设置如下时间刻度:

 ChartAxisGroupingEnum.chAxisGroupingManual;

 ChartAxisUnitTypeEnum.chAxisUnitMonth;

需要在SetData后面加上上面属性,否则会出现参数无效问题:

 InsertChart.SeriesCollection.Add(0);

            InsertChart.SeriesCollection[0].DataLabelsCollection.Add();
            InsertChart.SeriesCollection[0].DataLabelsCollection[0].HasValue = true;
            InsertChart.SeriesCollection[0].SetData(ChartDimensionsEnum.chDimSeriesNames, +(int)ChartSpecialDataSourcesEnum.chDataLiteral, "销售总额");
            InsertChart.SeriesCollection[0].SetData(ChartDimensionsEnum.chDimCategories, +(int)ChartSpecialDataSourcesEnum.chDataLiteral, strXdata);
            InsertChart.SeriesCollection[0].SetData(ChartDimensionsEnum.chDimValues, (int)ChartSpecialDataSourcesEnum.chDataLiteral, strYdata);

 

 

 InsertChart.Axes[0].GroupingType = OWC10.ChartAxisGroupingEnum.chAxisGroupingManual;

            InsertChart.Axes[0].GroupingUnitType = ChartAxisUnitTypeEnum.chAxisUnitMonth;
            InsertChart.Axes[0].NumberFormat = "yyyy-MM";
            InsertChart.Axes[0].GroupingUnit = 1;

本文转自94cool博客园博客,原文链接:http://www.cnblogs.com/94cool/archive/2011/05/11/2043231.html,如需转载请自行联系原作者

你可能感兴趣的文章
IIS7保存配置文件及导入、导出、备份、还原
查看>>
Rails3之父Yehuda离开Engine Yard投奔HTML5
查看>>
一起谈.NET技术,C#面向对象设计模式纵横谈:Singleton 单件
查看>>
一起谈.NET技术,IoC+AOP的简单实现
查看>>
一起谈.NET技术,技巧:使用可扩展对象模式扩展HttpApplication
查看>>
(三)spring cloud微服务分布式云架构 - 集成项目简介
查看>>
android 去掉actionbar 隐藏标题栏 全屏
查看>>
iphoneX 内嵌H5 底部头部兼容
查看>>
图片转base64
查看>>
Intellij+maven:jar包冲突的解决方法(Hbase和Guava的冲突)
查看>>
VC下这样创建实例m_pRecordset.CreateInstance(_uuidof(Connection))不一定成功!...
查看>>
设计模式解密(23) - 总结篇
查看>>
c#和javascript特殊字符的前后端转换
查看>>
shell批量修改mysql用户密码
查看>>
ROS 设置串口USB软连接
查看>>
ASP.NET MVC搭建项目后台UI框架—6、客户管理(添加、修改、查询、分页)
查看>>
461. Hamming Distance
查看>>
ubuntu 14.04开机出现错误“Error found when loading /root/.profile”解决
查看>>
20155225 2016-2017-2 《Java程序设计》第2周学习总结
查看>>
文档型数据库MongoDB简介
查看>>