|
multi bar multi colors |
Posted by itamar e on May-20-2013 22:59 |
|
Hi All,
I am working with CD, and I want to implement multi bar chart with multi colors for each category. For example the line $layer->addDataSet($data0, $colors_array, "Server #1");
where $data0 contain the data e.g array with 3 cells. and $colors_array will be array with 3 cell which contains the colors strings of the bars.
Do anyone know a solution? |
Re: multi bar multi colors |
Posted by Peter Kwan on May-21-2013 04:13 |
|
Hi itamar,
Basically, you need to create a "Multi-Stacked Bar Chart" (see the "Multi-Stacked Bar Chart" sample code. It is like:
$layer->addDataGroup();
for ($i = 0; $i < count($data0); ++$i)
$layer->addDataSet(array_pad(array_pad(array(), $i, NoValue), $i + 1, $data0[$i]), $colors_array[$i], "Server #1");
Hope this can help.
Regards
Peter Kwan |
|