ResetDataColors PowerScript function
Description
Restores the color of a data point to the default color for
its series.
Controls
Graph controls in windows and user objects, and graphs in
DataWindow controls
Syntax
1 |
<span>controlname</span>.<span>ResetDataColors</span> ( { <span>graphcontrol</span>, } <span>seriesnumber</span>, <br> <span>datapointnumber</span> ) |
Argument |
Description |
---|---|
controlname |
The name of the graph in which you want |
graphcontrol (DataWindow control |
(Optional) A string whose value is the |
seriesnumber |
The number of the series in which you |
datapointnumber |
The number of the data point for which |
Return Values
Integer. Returns 1 if it succeeds and
-1 if an error occurs. If any argument’s value is null, ResetDataColors returns null.

To set the color for a series, use SetSeriesStyle.
The color you set for the series is the default color for all data
points in the series.
Examples
These statements change the color of data point 10
in the series named Costs in the graph gr_product_data to
the color for the series:
1 |
SeriesNbr = gr_product_data.FinSeries("Costs") |
1 |
gr_product_data.<span>ResetDataColors</span>(SeriesNbr, 10) |
These statements change the color of data point 10
in the series named Costs in the graph gr_comps in
the DataWindow control dw_equip to
the color for the series:
1 |
SeriesNbr = dw_equipment.FindSeries("Costs")<br>dw_equip.<span>ResetDataColors</span>("gr_comps", SeriesNbr, 10) |