Description
Restores the color of a data point to the default color for its series.
Applies to
Graph controls in windows and user objects, and graphs in DataWindow controls
Syntax
controlname.ResetDataColors ( { graphcontrol, } seriesnumber, datapointnumber )
Argument |
Description |
---|---|
controlname |
The name of the graph in which you want to reset the color of a data point, or the name of the DataWindow containing the graph |
graphcontrol (DataWindow control only) |
(Optional) A string whose value is the name of the graph in the DataWindow control in which you want to reset the color |
seriesnumber |
The number of the series in which you want to reset the color of a data point |
datapointnumber |
The number of the data point for which you want to reset the color |
Return value
Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, ResetDataColors returns null.
Default color for data points
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:
SeriesNbr = gr_product_data.FinSeries("Costs") gr_product_data.ResetDataColors(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:
SeriesNbr = dw_equipment.FindSeries("Costs") dw_equip.ResetDataColors("gr_comps", SeriesNbr, 10)
See also