Vlad
Vlad

Reputation: 23

How to disable zoom in chart control in C#?

How can i disable zoom after mouse selection in System.Windows.Forms.DataVisualization.Charting.Chart control in a .Net 4.0 WinForms application? Actually I want to use selected area in other case but not for zooming.

Upvotes: 1

Views: 2581

Answers (2)

SNP
SNP

Reputation: 37

I have the same problem,this helpfull for me.

chart1.ChartAreas[0].AxisX.ScaleView.Zoomable = false;
chart1.ChartAreas[0].AxisY.ScaleView.Zoomable = false;

Upvotes: 2

Deffiss
Deffiss

Reputation: 1136

Just set:

chart.ChartAreas["ChartAreaName"].AxisX.ScaleView.Zoomable = false;
chart.ChartAreas["ChartAreaName"].AxisY.ScaleView.Zoomable = false;

Upvotes: 3

Related Questions