TTChartOnGetAxisLabel

type TTChartOnGetAxisLabel = procedure(ASender: TObject; Axis, SeriesIndex, ValueIndex: Integer; Var LabelText: WideString) of object;

Type Library
TeeChartx

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

1) : Labels.Style = talValue. Is this case, the SeriesIndex parameter and the ValueIndex parameter will be -1.

2) : Labels.Style = talText or talMark. The SeriesIndex 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 [Visual Basic]:

Private Sub Form_Load()

With TChart1

.AddSeries scLine

.Series(0).FillSampleValues 10

.Axis.Bottom.Labels.Style = talText

.Axis.Bottom.Labels.Angle = 90

.Panel.MarginBottom = 20

End With

End Sub

Private Sub TChart1_OnGetAxisLabel(ByVal Axis As Long, ByVal SeriesIndex As Long, ByVal ValueIndex As Long, LabelText As String)

If Axis = atBottom Then

Select Case ValueIndex

Case 0, 1, 2, 3, 4

LabelText = "1st Quarter"

Case 5, 6, 7, 8, 9

LabelText = "2nd Quarter"

End Select

End If

End Sub