'对于第二个ChSeries进行Ungroup
ThisChSeries.Ungroup(True)
'生成一个新的坐标轴
thisAxis = owcChart.Axes.Add(ThisChSeries.Scalings(Owc11.ChartDimensionsEnum.chDimValues))
'定义格式,默认为空字串
thisAxis.NumberFormat = sYAxis_NumFormat
'定义第二坐标轴靠右
thisAxis.Position = Owc11.ChartAxisPositionEnum.chAxisPositionRight
'重新定义坐标轴的最大刻度
If (sYAxis_Maximum.Length > 0) Then
thisAxis.Scaling.HasAutoMaximum = False
thisAxis.Scaling.Maximum = Integer.Parse(sYAxis_Maximum)
Else
thisAxis.Scaling.HasAutoMaximum = True
End If
'重新定义坐标轴的最小刻度
If (sYAxis_Minimum.Length > 0) Then
thisAxis.Scaling.HasAutoMinimum = False
thisAxis.Scaling.Minimum = Integer.Parse(sYAxis_Minimum)
Else
thisAxis.Scaling.HasAutoMinimum = True End If thisAxis.MajorTickMarks = Owc11.ChartTickMarkEnum.chTickMarkAutomatic
thisAxis.HasMajorGridlines = False
thisAxis.MajorGridlines.Line.Color = sYAxis_Color
thisAxis.MajorGridlines.Line.DashStyle = Owc11.ChartLineDashStyleEnum.chLineRoundDot
本文介绍如何为图表中的特定数据系列创建并定制新的坐标轴,包括设置坐标轴的位置、刻度范围、网格线样式等。
5453

被折叠的 条评论
为什么被折叠?



