IChartAxis.EnableReducingLabelSize

Fore Syntax

EnableReducingLabelSize: Boolean;

Fore.NET Syntax

EnableReducingLabelSize: boolean;

Description

The EnableReducingLabelSize property determines whether label font on the value axis is automatically reduced.

Comments

Available values:

Fore Example

Executing the example requires a form containing the components:

Add links to the MathFin, Forms, Chart system assemblies.

The example is a handler of the OnClick event for the Button1 component. To display data in the chart for the UiChart1 component, add the OnGetDataValue event handler, in which random values for the chart and the fixed step for value axis are set.

Class TestForm: Form
    UiChart1: UiChart;
    ChartBox1: ChartBox;
    Button1: Button;

    
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    
Var
        Chart : IChart;
        Axis1 : IChartAxis;
    
Begin
        Chart := UiChart1.Chart;
        Axis1 := Chart.AxisY;
        
// Set automatic reducing of fotn size of labels on the Y value axis
        Axis1.EnableReducingLabelSize := 
True;
    
End Sub Button1OnClick;

// Fill the chart with random data
    
Sub UiChart1OnGetDataValue(Sender: Object; Args: IUiChartGetDataValueEventArgs);
    Var
        Chart : IChart;
        Axis1 : IChartAxis; 
    
Begin
        
// Fill the chart with random data
        Args.Result := True;
        Args.Value := Math.RandBetween(
10,40);
        
// Set fixed step for the Y value axis
        Chart := UiChart1.Chart;
        Axis1 := Chart.AxisY;
        Axis1.StepMode := ChartAxisStepMode.FixedStep;
        Axis1.StepValue := 
5;
    
End Sub UiChart1OnGetDataValue;

End Class TestForm;

 

After executing the example, on resizing the chart the font size of labels is reduced only on clicking the Button1 button.

Fore.NET Example

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;
Imports Prognoz.Platform.Interop.MathFin;
...

    Private Sub uiChartNet1_OnGetDataValue(Sender: System.Object; Args: Prognoz.Platform.Interop.Chart.UiChartGetDataValueEventArgs);
    
Var
        Chart : IChart;
        Axis1 : IChartAxis; 
        CMath : MathClass = 
New MathClass();
    
Begin
        
// Fill the chart with random data
        Args.Result := True;
        Args.Value := CMath.RandBetween(
10,40);
        
// Set fixed step for the Y value axis
        Chart := UiChartNet1.ChartUi.Chart;
        Axis1 := Chart.AxisY;
        Axis1.StepMode := ChartAxisStepMode.casmFixedStep;
        Axis1.StepValue := 
5;
    
End Sub;

    
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
    
Var
        Chart : IChart;
        Axis1 : IChartAxis;
    
Begin
        Chart := UiChartNet1.ChartUi.Chart;
        Axis1 := Chart.AxisY;
        
// Set automatic reducing of fotn size of labels on the Y value axis
        Axis1.EnableReducingLabelSize := 
True;
    
End Sub;

See also:

IChartAxis | IChartAxis.StepValue