Use this method to perform a zoom to the specified min and max values. This method is only available in the zoom mode (see SetZoom).
The parameters required for this method are described below.
Parameter |
Description |
newXMin | Value of type Double indicating the plot's new minimum x-value for the passed in x-scale. |
newXMax | Value of type Double indicating the plot's new maximum x-value for the passed in x-scale. |
XScaleIndex | Value of type Integer indicating which x-axis the new min and max values pertain to. For charts with multiple x-scales, all other scales are zoomed to its corresponding values. Valid range: 1 to NumXScales. |
newYMin | Value of type Double indicating the plot's new minimum y-value for the passed in y-scale. |
newYMax | Value of type Double indicating the plot's new maximum y-value for the passed in y-scale. |
YScaleIndex | Value of type Integer indicating which y-axis the new min and max values pertain to. For charts with multiple y-scales, all other scales are zoomed to its corresponding values. Valid range: 1 to NumYScales. |
Example
'XYChartCtrl is the name of the XY Chart 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 = 1 '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 = 1 'Y-axis scale index the new y-min/max pertains to
'Perform a zoom; a Refresh call is not required
XYChartCtrl.SetZoom(True)
XYChartCtrl.SetZoomWindow(xMin, xMax, xScaleIdx, yMin, yMax, yScaleIdx)
See
Also