如何用OWC制作双轴的折线图?

gzlucky 2005-09-23 10:48:26
我想使用ASP.NET引用OWC11,在设置图表类型时,发现没有象Excel那样有那种双轴折线图。
在Excel的VBA中,可以看到Axes是一个二维数组,而在OWC中只是一个一维数组,所以在OWC中没办法为第二坐标设置参数。

不知道是不是OWC不支持双轴折线图?
...全文
220 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
gzlucky 2005-09-29
  • 打赏
  • 举报
回复
'对于第二个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
anchky 2005-09-28
  • 打赏
  • 举报
回复
恭喜
aobao 2005-09-28
  • 打赏
  • 举报
回复
解决了? 告诉我
foxconn_nich 2005-09-28
  • 打赏
  • 举报
回复
说来听听啊。。等待你的答案,谢谢
gzlucky 2005-09-24
  • 打赏
  • 举报
回复
已解决。

支持双轴图
gzlucky 2005-09-24
  • 打赏
  • 举报
回复
自己找到解决方法了。
gzlucky 2005-09-24
  • 打赏
  • 举报
回复
UP

有人知道吗? Could you do me a favor ?

4,816

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧