Hi,
Great module. I couldn't figure out a way to implement the "stacked : true" option.
For example, there's a stacked bar chart, on the example page:
http://g.raphaeljs.com/barchart2.html
The code for it is:
r.hbarchart(330, 10, 300, 220, [[55, 20, 13, 32, 5, 1, 2, 10], [10, 2, 1, 5, 32, 13, 20, 55]], {stacked: true}).hover(fin, fout);
And I'm trying to create something similar, like this:
$graphael = array(
'method' => 'hbar',
'values' => $values,
'params' => array(
'opts' => array(
'stacked' => TRUE,
),
),
);
return theme('graphael', $graphael);
Am I missing something? Or does the module just not support this yet?
Thanks,
Comments
Comment #1
sebsebseb123 commented...turns out the 'stacked' option IS supported. I'm just not implementing it properly.
I needed to change the order of the array so that the different values are associated with each other.
This is what I had:
But this is what I need:
This is not longer an issue but I would love some help with my use case.
I'm trying to create a thermometer style single bar. I misunderstood what 'stacked' does. So, I'm now calculating the remainder value... the value needed to make the "thermometer" full and stacking those onto each other... so my final code looks like this:
"Works"... except now I'm setting the colour of the "remainder" value to be white. Now the final part I'm missing is a border around that column.
Is there a good way to do this? Or, is there a better way to do single value thermometer style bar graphs?