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

Message ListMessage List     Post MessagePost Message

  WishList Item
Posted by Mark Manning on Oct-02-2010 03:01
Wish:

Be able to have two (or more) labels associated with each data point.

Why:

So you can have different looking labels for different areas of the chart.

So say I have a label like:

   2897364 - This is a really long label that goes on and on and on.
   2897364 - This is the shorter version of this label.
   2897364 - This is the really short version
   2897364

Then, when I create a chart I could use label1 for the legend but maybe label4 for the chart itself.

Or is this already possible?  I haven't seen it anywhere - but like the last time - maybe its there and I just haven't seen this capability.

  Re: WishList Item
Posted by Peter Kwan on Oct-02-2010 15:58
Hi Mark,

This feature is already available. You can attach extra fields to the layers or charts, and then configure the label or legend entry to show the extra field. See Layer.addExtraField and BaseChart.addExtraField.

For example, if you are drawing a pie chart, you may use:

$c->setData($myData, $myLongLabels);
$c->addExtraField($myShortLabels);

#show the extra field (the short label) and the percentage in the sector label
$c->setLabelFormat("{field0}: {percent}%");

Hope this can help.

Regards
Peter Kwan