我想在我的图表上应用比例 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/