回复 1楼hongbin的帖子
你好。这是可以实现的。
代码参考:
- c1chart.BeginUpdate();
-
- if (sender == rbX)
- {
- // limit scale of Y-axis
- c1chart.View.AxisY.MinScale = 1;
- c1chart.View.AxisY.Scale = 1;
- c1chart.View.AxisY.Value = 0.5;
- c1chart.View.AxisX.MinScale = 0.001;
- }
- else if (sender == rbY)
- {
- // limit scale of X-axis
- c1chart.View.AxisX.MinScale = 1;
- c1chart.View.AxisX.Scale = 1;
- c1chart.View.AxisX.Value = 0.5;
- c1chart.View.AxisY.MinScale = 0.001;
- }
复制代码
具体你可以参考我们的官网Demo。安装产品后,可以在路径C:\Users\【username】\Documents\ComponentOne Samples\Studio for WPF\C1.WPF.Chart\CS\ChartSamples\Interaction里找到InteractiveChart,有详细的代码。 |