ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Need to truncate axis labels
Posted by Mark on Feb-09-2011 00:38
I have an XY Chart with strings as labels along the Y-Axis. Some of these labels could be
very long, and may exceed the width of the label area.

By default, all the labels are right-aligned. My issue, however, is that for some of the
longest labels, the most valuable information in the label is at the start of the string.

What I would like to do is clip all axis labels at a certain pixel length (say, 200px), but still
right-align them.

I can't just let the label area be as big as is needed, because some of them could grow too
large, leaving little space for the data points.

Is there any way to accomplish this?

As another option, I could left-align the labels, if that would result in showing the labels
from the start. However, I'm not sure how to force axis labels to be left-aligned.

Thanks!

Mark

  Re: Need to truncate axis labels
Posted by Mark on Feb-09-2011 01:00
Ah, found my own answer.


Dim textbox As TextBox = c.xAxis().setLabels(labels)
textbox.setWidth(200)
textbox.setTruncate(200)
textbox.setAlignment(6) ' left

c.xAxis().setReverse()

Thanks for a great product!