public GetNextAxisLabelEventHandler GetNextAxisLabel
Remarks
An GetNextAxisLabel 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 Axes.Left, Axes.Right, Axes.Top or Axes.Bottom Axesclasses.
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.GetAxisLabel event to override the default Axis Labels text with your preferred Axis Label string representation.
Example
[C#] private void tChart1_GetNextAxisLabel(object sender, Steema.TeeChart.TChart.GetNextAxisLabelEventArgs e)
{
if (sender == tChart1.Axes.Left)
{
/* In this example, we want the Vertical Left Axis to show
labels only for positive values, starting at zero and
with 250 label increment.*/
if (e.LabelValue>=250)
e.LabelValue=e.LabelValue+250;
else e.LabelValue=250;
/* we want labels up to 1000 */
if (e.LabelValue>999)
e.Stop=true;
else
e.Stop=false;
}
}
See Also
TChart Class | TChart Members | Steema.TeeChart Namespace