Articles in this section
Category / Section

How to zoom a chart programmatically?

1 min read

 

You can zoom the chart programmatically using the ZoomFactor property of ChartAxis class. The function mulzoomcenter also can be used to zoom the chart by passing the zoomfactor value as parameter.

The following code is the example for zooming a chart using mulzoomcenter function.

C#

// To zoom in

Chart1.Areas[0].Axes[0].MulZoomCenter(0.5);

Chart1.Areas[0].Axes[1].MulZoomCenter(0.5);

//To Zoom out

Chart1.Areas[0].Axes[0].MulZoomCenter(2);

Chart1.Areas[0].Axes[1].MulZoomCenter(2);

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied