ITChart.OnGetNextAxisLabel
ITChart

property OnGetNextAxisLabel: TTChartOnGetNextAxisLabel;

Type Library
TeeChartx

Description
An OnGetNextAxisLabel event is used to define custom Axis Labels. Using this event you can customize Axis Labels positions and values.

This event gets called in a loop until you set the MoreLabels parameter to False OR the LabelValue parameter is BIGGER than the Axis Maximum value.

The MoreLabels parameter is True by default, meaning that if it's not set to False the first time this event gets called, TeeChart will draw the default Axis Labels.

The Sender parameter specifies the Axis subclass. It can be the Chart Axis.Left, Axis.Right, Axis.Top or Axis.Bottom axis classes.

The LabelIndex parameter is an incremental counter for you to know which Label the event is asking for a value.

The LabelValue parameter must be filled with the desired Axis Label value.

You can use the TChart.OnGetAxisLabel event to override the default Axis Labels text with your preferred Axis Label string representation.

Example [Visual Basic]:

Private Sub TChart1_OnGetNextAxisLabel(ByVal Axis As Long, ByVal LabelIndex As Long, LabelValue As Double, MoreLabels As Boolean)

If Axis = atBottom Then

MoreLabels = True

'Only label if following cases are true

Select Case LabelIndex

Case 0: LabelValue = 11

Case 1: LabelValue = 19

Case 2: LabelValue = 23

Case Else: MoreLabels = False

End Select

End If

End Sub