I want to zoom chart programmatically to a specific range of data, but I don't know what method to use.
What methods should I use for that?
zoomPan.ZoomByRange(yAxis, 50, 60); // Specify the range to zoom
Thank you for your answer.
1. I want to zoom and pan on DateTimeAxis, how can I use the ZoomByRange method?
2. More important, how can I zoom to fit on numerical axis(the vertical one).
double startDate = new DateTime(2017, 10, 5).ToOADate();
double endDate = new DateTime(2017, 10, 7).ToOADate();
zoomPan.ZoomByRange(xAxis,startDate,endDate); // Specify the range to zoom
zoomPan.ZoomByRange(yAxis, 0, 2); // Specify the range to zoom