AddSerie(Serie: IChartSerie; ToTheBeginning: Boolean): Integer;
AddSerie(Serie: Prognoz.Platform.Interop.Chart.IChartSerie; ToTheBeginning: boolean): integer;
Serie. A series.
ToTheBeginning. Indicates whether a newly created relative series group is located at the top or at the bottom of a list of series groups. If the value is True, the group is located at the top.
The AddSerie method deletes the specified series from the group, to which it belongs. Then it creates a new relative group and adds this series to it. After that the method returns the index of the created group.
The method is outdated, use IChartStyleRelativeGroup.Move and IChartStyleRelativeGroup.MoveTo.
A relative group is formed by summation of series values. In this case the summary chart looks as follows:
Executing the example requires a form with the UiChart, ChartBox and Button components on the form with the UiChart1, ChartBox1 and Button1 identifiers respectively. The UiChart1 component must be a data source for the ChartBox1 component, and it must have the Mixed type of a scale for a chart.
The example is an event handler for a button.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Chart: IChart;
SerieC: IChartSerie;
Begin
Chart := ChartBox1.Chart;
SerieC := Chart.Series.Item(0);
Chart.StyleGroup.AddSerie(SerieC, True).ToString;
End Sub Button1OnClick;
After executing the example the specified series is removed from its group and placed to a newly created relative group of series located at the top of the list of series groups. The index of the newly created relative series group is also obtained.
Executing the example requires a form with the UiChartNet, ChartBoxNet and Button components on the form with the UiChartNet1, ChartBoxNet1 and Button1 identifiers respectively. The UiChartNet1 component must be a data source for the ChartBoxNet1 component, and it must have the Mixed type of a scale for a chart.
The example is an event handler for a button.
Imports Prognoz.Platform.Interop.Chart;
...
Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Chart: IChart;
SerieC: IChartSerie;
Begin
Chart := ChartBoxNet1.CtrlBox.Chart;
SerieC := Chart.Series.Item[0];
Chart.StyleGroup.AddSerie(SerieC, True).ToString();
End Sub;
After executing the example the specified series is removed from its group and placed to a newly created relative group of series located at the top of the list of series groups. The index of the newly created relative series group is also obtained.
See also: