UiChart.OnGetCategoryName

Syntax

Sub OnGetCategoryName(Sender: Object; Args: IUiChartCategoryNameEventArgs);

Begin

//set of operators

End Sub OnGetCategoryName;

Parameters

The Sender parameter returns the component that has generated the event.

The Args parameter allows to define event parameters.

Description

The OnGetCategoryName event enables to determine names of points for the category axis. This event occurs when a chart is drawn.

NOTE. You can set name format using the UiChart.OnGetCategoryFormat event.

Example

This example assumes that there is the UiChart1 object of the UiChart type.

Sub UiChart1OnGetCategoryName(Sender: Object; Args: IUiChartCategoryNameEventArgs);
Begin
    Args.Result := DateTime.AddDays(DateTime.Now, Args.PointIndex);
End Sub UiChart1OnGetCategoryName;

Sub UiChart1OnGetCategoryFormat(Sender: Object; Args: IUiChartCategoryFormatEventArgs);
Begin
    Args.Result := "dddd d MMMM yyyy";
End Sub UiChart1OnGetCategoryFormat;

After executing the example names of points of the category axis are created using the name of the weekday and the date:

See also:

UiChart