使用OWC 做图表时按周、月、年设置时间刻度是参数无效问题解决方法
2011-05-11 14:52
706 查看
设置如下时间刻度:
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;
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;
相关文章推荐
- Android闹钟启动时间设置无效问题的解决方法
- 编写SqlHelper使用,在将ExecuteReader方法封装进而读取数据库中的数据时会产生Additional information: 阅读器关闭时尝试调用 Read 无效问题,解决方法与解释
- android TextView多行文本(超过3行)使用ellipsize属性无效问题的解决方法
- android TextView多行文本(超过3行)使用ellipsize属性无效问题的解决方法
- 回发或回调参数无效。在配置中使用 问题解放方法
- android TextView多行文本(超过3行)使用ellipsize="end"属性无效问题的解决方法
- word2007的问题 此错误通常是由宏安全性设置造成的。如果您知道宏来自您信任的来源,则可将宏安全性设置更改为允许启用宏。宏安全性设置的更改方式取决于您使用的 Microsoft Office System 程序 解决方法
- visual studio设置为使用IIS运行网站时加载项目遇到权限问题的解决方法
- 编写SqlHelper使用,在将ExecuteReader方法封装进而读取数据库中的数据时会产生Additional information: 阅读器关闭时尝试调用 Read 无效问题,解决方法与解释
- 如何解决mid使用过程中出现的以下问题(无效的过程调用或参数: 'mid')
- Rundll32.exe原理及使用, 参数传递问题解决方法(可用于批处理中)
- LoadRunner(二)LR参数文件多列的使用和局部变量超长的问题解决方法
- 如何解决mid使用过程中出现的以下问题(无效的过程调用或参数: 'mid')
- VS2005下使用VC,部分断点无效问题解决方法
- git使用.gitignore设置不生效或不起作用问题的解决方法
- 关于label和span设置width无效问题解决方法
- 解决串口通讯中部分串口ReadFile使用SetCommTimeouts设置超时无效的问题
- Mybatis传单个参数和<if>标签同时使用的问题及解决方法
- Android中xml布局文件中使用include引入布局进行复用(解决使用include布局重叠,颜色设置无效问题)
- timer的一个使用方法,解决timer无效的问题