TCustomAxisPanel.OnGetAxisLabel

TCustomAxisPanel.OnGetAxisLabel
TCustomAxisPanel

property OnGetAxisLabel: TAxisOnGetLabel;

Unit
TeEngine

Description
An Event is triggered for each Axis Label painted.
There are two different uses for OnGetAxisLabel:

1) Axis Labels are Values.
I
n this case, the Series parameter will be nil, and the ValueIndex will be -1.

2)
Axis Labels are Series points.
The Series parameter will be a valid TChartSeries, and the ValueIndex will be the current Series point position.
You can change the LabelText referred parameter for drawing a different Axis Label.

Example
:

procedure TForm1.Chart1GetAxisLabel(Sender: TChartAxis;
Series: TChartSeries; ValueIndex: Integer; var LabelText: String);
begin
If Sender = Chart1.BottomAxis Then
Case StrToInt(FormatDateTime('mm', StrToDate(LabelText))) of
1,2,3 : LabelText := '1st Qtr';
4,5,6 : LabelText := '2nd Qtr';
end;
end;