IChartAxis.IntervalsCount

Fore Syntax

IntervalsCount: Integer;

Fore.NET Syntax

IntervalsCount: integer;

Description

The IntervalsCount property determines the number of intervals on the Y axis.

Comments

The IntervalsCount property is applicable only to value axis.

When a fixed number of intervals on an axis is set, set the StepMode property to an appropriate value.

Fore Example

Executing the example requires a form, the Button component with the Button1 identifier on the form, the ChartBox component with the ChartBox1 identifier and the UiErAnalyzer component with the UiErAnalyzer1 identifier, which is used as a data source for the ChartBox1 component. Specify the express report saved on the chart sheet as a data source for the UiErAnalyzer1 component.

The example is a handler of the OnClick event for the Button1 component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Chart: IChart;
    ChartAxis: IChartAxis;
Begin
    Chart := ChartBox1.Chart;
    ChartAxis := Chart.AxisY;
    ChartAxis.StepMode := 2 As ChartAxisStepMode;
    ChartAxis.IntervalsCount := 2;
End Sub Button1OnClick;

After executing the example the Y axis has two intervals only.

Fore.NET Example

Executing the example requires a form, the Button component with the Button1 identifier on the form, the chartBoxNet component with the chartBoxNet1 identifier and the uiErAnalyzerNet component with the uiErAnalyzerNet1 identifier, which is used as a data source for the chartBoxNet1 component. Specify the express report saved on the chart sheet as a data source for the uiErAnalyzerNet1 component.

The example is a handler of the Click event for the button1 component.

Add a link to the Chart system assembly.

Imports Prognoz.Platform.Interop.Chart;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    Chart: IChart;
    ChartAxis: IChartAxis;
Begin
    Chart := chartBoxNet1.CtrlBox.Chart;
    ChartAxis := Chart.AxisY;
    ChartAxis.StepMode := 2 As ChartAxisStepMode;
    ChartAxis.IntervalsCount := 2;
End Sub;

After executing the example the Y axis has two intervals only.

See also:

IChartAxis|IChartAxis.StepMode