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

Message ListMessage List     Post MessagePost Message

  Right justify labels on XYChart
Posted by Chris Carney on Dec-08-2008 20:16
Any way to specify that the labels running along the y axes (which is positioned on the right of the chart) can be right justified?

Thanks,

Chris

  Re: Right justify labels on XYChart
Posted by Peter Kwan on Dec-09-2008 02:24
Hi Chris,

Yes. The y-axis labels can be "right aligned". But you need to specify what should the labels aligned to.

Suppose you want the labels to right aligned to the right edge of the chart. You need to determine what is the from the label starting point on the axis to the right edge. (You may just take the distance of the right axis to the right edge, minus a margin such as 8.)
Suppose that distance is 50. The code is then (in VB/VBScript):

Set t = c.yAxis2().setLabelStyle("arial.ttf", 8)
Call t.setSize(50, 0)
Call t.setAlignment(cd.Right)

Hope this can help.

Regards
Peter Kwan