AltColorSetID: String;
AltColorSetID: string;
The AltColorSetID property determines identifier of alternative color palette for a chart series.
If the property is not set or contains identifier of non-existing set, the default palette is used.
Executing the example requires a form containing the components:
ChartBox with the ChartBox1 identifier.
UiChart with the UiChart1 identifier. It is required to set the number of points and series for UiChart1. The UiChart1 component is a data source for ChartBox1. To plot a chart, create the event handlers OnGetDataValue and OnGetSerieName.
Sub UserProc;
Var
chart: IChart;
i: Integer;
serie: IChartSerie;
Begin
chart := UiChart1.Chart;
// For all series set alternative color palette
For i := 0 To chart.Series.Count - 1 Do
serie := chart.Series.Item(i);
serie.AltColorSetID := "CustomPalette";
End For;
End Sub userproc;
After executing the example chart series change their color set.
The requirements and result of the Fore.NET example execution match with those of the Fore example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Chart;
…
Public Sub UserProc();
Var
chart: IChart;
i: Integer;
serie: IChartSerie;
Begin
chart := UiChartNet1.ChartUI.Chart;
// For all series set alternative color palette
For i := 0 To chart.Series.Count - 1 Do
serie := chart.Series.Item[i];
serie.AltColorSetID := "CustomPalette";
End For;
End Sub UserProc;
See also: