ExcludeChartElements(Elements: Array);
ExcludeChartElements(Elements: System.Array);
Elements. Array containing chart elements to be excluded.
The ExcludeChartElements method excludes from selection specified dimensions elements.
Array which is set in the Elements parameter can contain series or points of chart. On method executing, dimension elements corresponding to selected chart elements will be excluded from selection.
Executing the example requires a form containing the Button component named Button1, the UiErAnalyzer component named UiErAnalyzer1 which is a data source for the ChartBox component named ChartBox1. Chart of the express report specified as data source for UiErAnalyzer1 should contain at least two series. Set for the UiErAnalyzer1 component the Active property = True.
Add links to the Express and Chart system assembles.
The procedure is a handler of the OnClick event for the Button1 component.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Eax: IEaxAnalyzer;
Chart: IChart;
Series: IChartSeries;
Arr: Array Of Variant;
Begin
Eax := UiErAnalyzer1.ErAnalyzer;
Chart := Eax.Chart.Chart;
Arr := New Variant[2];
Series := Chart.Series;
Arr[0] := Series.Item(0);
Arr[1] := Series.Item(1);
Eax.ExcludeChartElements(Arr);
End Sub Button1OnClick;
On button clicking the first two chart series are removed.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Express;
…
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Eax: IEaxAnalyzer;
Chart: IChart;
Series: IChartSeries;
Arr: Array Of object;
Begin
Eax := UiErAnalyzerNet1.ErAnalyzer.ErAnalyzer;
Chart := Eax.Chart.Chart;
Arr := New object[2];
Series := Chart.Series;
Arr[0] := Series.Item[0];
Arr[1] := Series.Item[1];
Eax.ExcludeChartElements(Arr);
End Sub;
See also: