IEaxAnalyzerCore.KeepOnlyChartElements

Fore Syntax

KeepOnlyChartElements(Elements: Array);

Fore.NET Syntax

KeepOnlyChartElements(Elements: System.Array);

Parameters

Elements. Array containing the chart series or points which should be left available.

Description

The KeepOnlyChartElements method changes selection in such a way that only the specified chart elements are available.

Comments

If only points are specified in the array, the specified points are available if both series and points are specified, the specified series are series of specified points are available.

Fore Example

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. The chart of the express report specified as data source for UiErAnalyzer1 should contain at least two series. Set the Active property to = True for the UiErAnalyzer1 component.

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).SeriePoint(0);
    Arr[1] := Series.Item(1).SeriePoint(0);
    Eax.KeepOnlyChartElements(Arr);
    Debug.WriteLine(Series.Count.ToString);
End Sub Button1OnClick;

Clicking the button keeps available only first points of two specified rows on the chart.

Fore.NET Example

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 := UiErAnalyzerNet2.ErAnalyzer.ErAnalyzer;
    Chart := Eax.Chart.Chart;
    Arr := New object[2];
    Series := Chart.Series;
    System.Diagnostics.Debug.WriteLine(Series.Count.ToString());
    Arr[0] := Series.Item[0].SeriePoint[0];
    Arr[1] := Series.Item[1].SeriePoint[0];
    Eax.KeepOnlyChartElements(Arr);
    System.Diagnostics.Debug.WriteLine(Series.Count.ToString());
End Sub;

The result of the Fore.NET example execution matches with that of the Fore example.

See also:

IEaxAnalyzeCore