当前位置: 代码迷 >> 综合 >> owc11 双Y轴
  详细解决方案

owc11 双Y轴

热度:20   发布时间:2023-12-14 00:09:14.0
 

//双Y轴
//且第二条曲线和第三条曲线 公用右侧Y轴
InsertChart.SeriesCollection[1].Ungroup(true);
InsertChart.SeriesCollection[1].Group(InsertChart.SeriesCollection[2]);

//右侧Y轴
Microsoft.Office.Interop.Owc11.ChAxis seAxes = InsertChart.Axes.Add(InsertChart.SeriesCollection[1].get_Scalings(ChartDimensionsEnum.chDimValues));
seAxes.Position = Microsoft.Office.Interop.Owc11.ChartAxisPositionEnum.chAxisPositionRight;
seAxes.HasMajorGridlines = false;
seAxes.MajorUnit = 1;
seAxes.Scaling.Minimum = 0;
InsertChart.Axes[2].HasTitle = true;
InsertChart.Axes[2].Title.Caption = "右侧Y轴 单位多少";