You can set a gauge's value and ranges via the Graph. SetGaugeValue() and Graph. SetGaugeRange() PCScript methods.
The Graph. SetGaugeValue() method accepts multiple sets of one to four parameters in the following order: the gauge value, the gauge label, the gauge minimum value, and the gauge maximum value.
To set the color ranges in a gauge, you should use the Graph. SetGaugeRange() command. This method accepts multiple sets of four parameters: the name of the range, the six-digit hexadecimal color code, the minimum value in the range, and the maximum value in the range. Note that the color code should not be preceded by a pound # sign. Each parameter set should be separated by a semi-colon.
Assuming that your graph object is named gauge, you could set the values for the gauge from Example 12.16 with the PCScript in Example 12.17: