|
XYChart marks removes axis labels |
Posted by alebor on Nov-26-2011 21:25 |
|
Hi,
When I add a X/Y mark on a ScatterChart the original axis value near the mark is not shown anymore. Please refer to the attachment below. Empty axis values are circled.
I want all axis values to be shown on the axis regardless of the mark. How can I do this?
CharDirector version: 5.0.2
Br,
Alebor
|
Re: XYChart marks removes axis labels |
Posted by Peter Kwan on Nov-28-2011 22:55 |
|
Hi alebor,
ChartDirector will remove the existing axis label only if the mark label is position similar to the axis label (eg. to the left of the left y-axis), and the "original position" of the mark label overlaps with the existing axis label.
For your case, your marks appear to be inside the plot area. There are two methods which can achieve this effect:
(a) The mark label is in fact position similar to the axis label, but it is moved using TextBox.setPos to inside the plot area. In this case, the axis label will be hidden if before the movement, the mark label overlaps with the axis label.
(b) The TextBox.setAlignment is used to ask ChartDirector to position the mark inside the plot area. With this method, the axis label should not be removed. For example, in C#/Java:
Mark m = c.yAxis().addMark(.....);
//Put the label at the top-left corner of the mark (inside the plot area)
m.setAlignment(Chart.TopLeft);
I suspect your code may be using method (a), so the axis labels are removed. If the code is modified to use method (b), the axis labels should remain.
Hope this can help.
Regards
Peter Kwan |
|