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

Message ListMessage List     Post MessagePost Message

  How to reposition data labels on a bar chart
Posted by Bert Sirkin on May-08-2013 23:50


I have the following code that adds data labels to a bar layer:

layer.setDataLabelStyle("arial", 10, Chart.CColor(System.Drawing.Color.Yellow))
layer.setDataLabelFormat("{value|2}")


The data labels appear are at the very top of each bar. I would like the labels to appear in
the middle (vertically and horizonally) of each bar. How is that done?

thanks,
Bert

  Re: How to reposition data labels on a bar chart
Posted by Peter Kwan on May-09-2013 13:36
Hi Bert,

You may try:

layer.setDataLabelStyle("arial", 10, Chart.CColor(System.Drawing.Color.Yellow)).setAlignment(Chart.Center);

Hope this can help.

Regards
Peter Kwan

  Re: How to reposition data labels on a bar chart
Posted by Bert Sirkin on May-09-2013 19:11
Thanks!
Bert