Page 1 of 1

AxisLabelResolver

Posted: Sat Jun 21, 2008 1:45 pm
by 7667592
I have not been able to find much documentation on AxisLabelResolver, so I've been playing around with it in an attempt to find out how it works.

For my explorations, I have been using Box. This is because I'm interested in creating a Box Plot with clusterings of boxes. In doing this, I will probably need custom axes labels.

1. Would it be possible for someone to explain a little about the use of AxisLabelResolver?

2. For the method:

Code: Select all

public String getLabel(Axis axis, ISeries s, int valueIndex, String labelText)
s is null and valueIndex is -1. What are these for?

3. What is the method getNextLabel for?

4. What does the boolean argument to the NextAxisLabelValue constructor do?

Regards,
Jesse

Posted: Mon Jun 23, 2008 9:49 am
by narcis
Hi Jesse,

1. Would it be possible for someone to explain a little about the use of AxisLabelResolver?
You'll find an example at Welcome!\Axes\Labels\Custom Labels I in TeeChart.Features.jar
2. For the method:
Code:
public String getLabel(Axis axis, ISeries s, int valueIndex, String labelText)
s is null and valueIndex is -1. What are these for?
This only works when you are using custom labels, not axes standard labels.
3. What is the method getNextLabel for?

4. What does the boolean argument to the NextAxisLabelValue constructor do?


An NextAxisLabelValue 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 Stop parameter to False OR the LabelValue parameter is BIGGER than the Axis Maximum value.

The stop 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 axis parameter specifies the Axis subcomponent. It can be the Chart LeftAxis, RightAxis, TopAxis or BottomAxis axis components.

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

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

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