int SetAxisRange (int panelHandle, int controlID, int xAxisScaling, double xminORxinit, double xmaxORxinc, int yAxisScaling, double ymin, double ymax);
Sets the scaling mode and the range of the x- and y-axes for a graph or strip chart control.
For a strip chart control x-axis, the x-offset and x-increment are set rather than the min and max.
SetAxisRange does not support the right y-axis and is therefore obsolete. NI recommends that you use SetAxisScalingMode instead. To set the x-offset and x-increment for a strip chart, use the ATTR_XAXIS_GAIN and ATTR_XAXIS_OFFSET attributes.
Input | ||||||||||
Name | Type | Description | ||||||||
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel. | ||||||||
controlID | integer | The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl. | ||||||||
xAxisScaling | integer | Scaling mode for the x-axis. The following table lists valid values.
|
||||||||
xminORxinit | double-precision | For a graph, xmin specifies the minimum axis range when you configure the x-axis for manual scaling. In this case, xmax must exceed xmin. For a strip chart, xinit specifies the initial x-axis value. The default value is 0.0. |
||||||||
xmaxORxinc | double-precision | For a graph, xmax specifies the maximum axis range when you configure the x-axis for manual scaling. In this case, xmax must exceed xmin. For a strip chart, xinc specifies the x-axis increment for each new point. The default value is 1.0. |
||||||||
yAxisScaling | integer | Scaling mode for the y-axis. The following table lists valid values.
|
||||||||
ymin | double-precision | The minimum axis range when you configure the y-axis for manual scaling. In this case, ymax must exceed ymin. The default value is 0.0. |
||||||||
ymax | double-precision | The maximum axis range when you configure the y-axis for manual scaling. In this case, ymax must exceed ymin. The default value is 1.0. |
Name | Type | Description | ||||
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
|