XY Chart NET 3 Control Reference > Methods > SetZoomWindow Method |
Use this method to perform a zoom to the specified min and max values. This method is only available in the zoom mode (see SetZoomMode).
[Visual Basic] Sub SetZoomWindow(newXMin As Double, newXMax As Double, XScaleIndex As Integer, newYMin As Double, newYMax As Double, YScaleIndex As Integer) |
[C#] void XYChartNETCtl.SetZoomWindow(double newXMin, double newXMax, int XScaleIndex, double newYMin, double newYMax, int YScaleIndex) |
[C++] void SetZoomWindow(double, double, int, double, double, int) |
' XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form. Dim xMin As Double Dim xMax As Double Dim yMin As Double Dim yMax As Double Dim xScaleIdx As Integer Dim yScaleIdx As Integer xMin = CDbl(XMinValue.Text) 'New x-min value xMax = CDbl(XMaxValue.Text) 'New x-max value xScaleIdx = 0 'X-axis scale index the new x-min/max pertains to yMin = CDbl(YMinValue.Text) 'New y-min value yMax = CDbl(YMaxValue.Text) 'New y-max value yScaleIdx = 0 'Y-axis scale index the new y-min/max pertains to 'Perform a zoom; a Refresh call is not required XyChartNETCtl1.SetZoomMode(True) XyChartNETCtl1.SetZoomWindow(xMin, xMax, xScaleIdx, yMin, yMax, yScaleIdx)