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

Message ListMessage List     Post MessagePost Message

  LegendBox
Posted by Joe Smith on Apr-18-2011 19:01
Hi,

is it possible to make the shapes in LegendBox circular (Chart.CircleShape) for a PieChart?
I can not find a way since I can't use the addScatterLayer method which I used for XYChart.
Best regards

  Re: LegendBox
Posted by Peter Kwan on Apr-19-2011 01:24
Hi Joe,

There are several methods I can think of, one of them is to directly draw the legend with your own code. It is like (in Java):

int yPos = 60;
for (int i = 0; i < labels.length; ++i) {
   c.getDrawArea().circle(340, yPos + 10, 6, 6, 0x000000, Chart.DataColor + i);
   yPos += c.addText(350, yPos, labels[i], "arialbd.ttf", 12).getHeight();
}

The above code use a loop to draw a circle and some text in a line, then move to next line.

Hope this can help.

Regards
Peter Kwan