IChartAxis.EnableReducingLabelSize

Syntax

EnableReducingLabelSize: Boolean;

Description

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

Comments

Available values:

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.

See also:

IChartAxis | IChartAxis.StepValue