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

Message ListMessage List     Post MessagePost Message

  YAxis Format
Posted by Steph on Jun-10-2016 09:52
Hi Peter,

How do you format the Y Axis so that numbers appear as 1,000,200 instead of 1000200 for example.

Thanks a lot

  Re: YAxis Format
Posted by Peter Kwan on Jun-10-2016 22:29
Hi Steph,

You can use Axis.setLabelFormat. For example, for an XYChart, it is like:

c.yAxis().setLabelFormat("{value|,}");

If you are using a FinanceChart object, please apply the above to the XYChart that you want to have the axis formatted using "," as the thousand separator. For example:

XYChart m = c.addMainChart(........);

// apply the formatting to the main y-axis of the main price chart
m.yAxis().setLabelFormat("{value|,}");

Hope this can help.

Regards
Peter Kwan