c# - 如何在 MS Chart 的折线图中缩放辅助轴 (Axis2)?

标签 c# winforms mschart

我想在我的图表上应用比例 View 选项。我编写了以下代码,允许我在 AxisY 上缩放 View 。但不是在 AxisY2 上。

chart1.ChartAreas["Area"].CursorY.IsUserEnabled = true;
chart1.ChartAreas["Area"].CursorY.IsUserSelectionEnabled = true;
chart1.ChartAreas["Area"].AxisY.ScaleView.Zoomable = true;
chart1.ChartAreas["Area"].AxisY2.ScaleView.Zoomable = true;

我可以在 AxisY 上缩放,但不能在 AxisY2 上缩放。任何人都可以知道我必须更改或添加到我的代码中的内容吗?

最佳答案

我已经根据下面的代码通过自己的努力解决了这个问题。

chart1.ChartAreas["Area"].AxisY2.ScaleView.Zoomable = true;
chart1.ChartAreas["Area"].AxisY2.ScaleView.Zoom(ScaleMinValue, ScaleMaxValue);

关于c# - 如何在 MS Chart 的折线图中缩放辅助轴 (Axis2)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13620479/

相关文章:

c# - 检测新软件安装并使用 C# 阻止它

c# - FileStream 流 = File.OpenRead(文件名);

c# - VB.Net 到 C# 的转换 <sql></sql>

C# 运行时错误 : "DataGridViewComboBoxCell value is not valid"

vb.net - 分组后图表区域不显示注释

图表区域内的 MSchart 标签

c# - MVC 3 Razor - 如何阻止 View 引擎搜索 aspx 和 ascx 页面?

winforms - 将 VB6 项目转换为 .net- 引用错误?

c# - 在 Windows 窗体中以编程方式添加新的用户控件

c# - 使用 mschart 在数据点上设置标签