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

Message ListMessage List     Post MessagePost Message

  Separate bars of Multi-Cylinder Chart
Posted by dl03bert on Jul-04-2011 17:35
Hello,
Is it possible to divide each data bars in 3 parts on the graph "Multi-Cylinder Chart"?
I need to divide each serveur in 3 levels
If so, how please?

Ps : Excuse my English, I'm French

Thank you

  Re: Separate bars of Multi-Cylinder Chart
Posted by Peter Kwan on Jul-05-2011 01:43
Hi dl03bert,

Yes. ChartDirector can do what you need.

In the original "Multi-Cylinder Chart" sample code, for each month, there are 3 bars (red, green and blue). If you want to separate each bar into 3 parts, there will be 9 segments, and therefore 9 data series (9 arrays).

The sample code "Multi-Stacked Bar Chart" demonstates a bar chart with similar data arrangement. (The sample code is using 2 bars, with each bar having 2 segments, but you can change it to 3 bars and 3 segments.)

In Java/C#, the code is like:

BarLayer layer = c.addBarLayer2(Chart.Stack);
layer.setBarShape(Chart.CircleShape);
layer.setBarGap(0.2, Chart.TouchBar);

layer.addDataGroup("Group 0");
layer.addDataSet(data0, -1, "AAA");
layer.addDataSet(data1, -1, "BBB");
layer.addDataSet(data2, -1, "CCC");

layer.addDataGroup("Group 1");
layer.addDataSet(data3, -1, "PPP");
layer.addDataSet(data4, -1, "QQQ");
layer.addDataSet(data5, -1, "RRR");

layer.addDataGroup("Group 2");
layer.addDataSet(data6, -1, "XXX");
layer.addDataSet(data7, -1, "YYY");
layer.addDataSet(data8, -1, "ZZZ");

Hope this can help.

Regards
Peter Kwan

  Re: Separate bars of Multi-Cylinder Chart
Posted by dl03bert on Jul-05-2011 15:27
Hi Peter Kwan,

Thank you very much for your help.
I adapted the code to php and it works !

Best Regards.