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

Message ListMessage List     Post MessagePost Message

  Omit data labels on a pos/neg chart
Posted by Steve on May-10-2021 03:57
I am creating a pos/neg bar chart using the perl sample code https://www.advsofteng.com/doc/cdperl.htm#posnegbar.htm.  I don't want the data labels at the ends of the bars, but I can't determine how to turn them off. The Axis.setLabels method doesn't seem to offer any option to do so.

  Re: Omit data labels on a pos/neg chart
Posted by Peter Kwan on May-10-2021 15:35
Hi Steve,

If you are referring to the numeric labels at the top or bottom of the bars, you can remove them by removing the following line.

$layer->setAggregateLabelStyle("arialbd.ttf", 8, $layer->yZoneColor(0, 0xcc3300, 0x3333ff));

For the bars, there are two kinds of labels - data labels and aggregate labels. An example that uses both types of labels are at:

https://www.advsofteng.com/doc/cdperl.htm#stackedbar.htm

By default, those labels are not drawn. If the code configures the style or format of those labels, ChartDirector assumes the intention is to display them, so it will draw them.

Regards
Peter Kwan