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

Message ListMessage List     Post MessagePost Message

  setLabelFormat
Posted by Xochitl on Aug-22-2014 04:46
Hi, could you help me please?. I'm doing a pie chart, I show the chart with data but I need add another data, I first I used Start Angle and Direction thats ok, but I need show the data cost of label, then I used a Circular Label Layout, I generated another data array with cost but I can't show the cost, could you help please:

push(@$data_costo, $cost_comp);

$c->setLabelFormat("{label}\\nUS\\${value}K\\n")

  Re: setLabelFormat
Posted by Peter Kwan on Aug-23-2014 01:43
Hi Xochitl,

You can add an additional field using BaseChart.addExtraField, and then use {field0} to
represent that field in the label. It is like:

my $additionalData = [111, 222, 333, ...];
$c->addExtraField($additionalData);

$c->setLabelFormat("<*block*>{label}<*font=arialbd.ttf,color=FF0000*> \\${value}K :
{field0}<*br*><*block*>\\n <*block,halign=center*><*color=000000*>({percent}%)
<*block*>");

Hope this can help.

Regards
Peter Kwan