zoukankan      html  css  js  c++  java
  • 使用OWC 做图表时按周、月、年设置时间刻度是参数无效问题解决方法

    设置如下时间刻度:

     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;

  • 相关阅读:
    学习java第8课:idea新建项目
    学习java第9课:IDEA注释
    淘宝专业术语
    学习java第2课:电脑常用快捷键
    学习java第7课:初识idea
    学习java第5课:java程序运行机制
    学习java第6课:Hello,World!
    学习java第4课:java 安装卸载
    学习java第3课;dos命令
    odoo命名规范及常用函数
  • 原文地址:https://www.cnblogs.com/94cool/p/2043231.html
Copyright © 2011-2022 走看看