I'm looking for a Javascript solution to mix Grouped and Stacked Bars with a beautiful graph, such as those provided by Protovis.
For example if I want to compare downloads on Apple (iPads+iPhones) devices to Android devices, I might have (excuse my terrible ascii art)
60k | ^ 50k | # ^ ^ 40k |# # ^ #^ 30k |@ #^ ^ #^ 20k |@^ #^ #^ @^ 10k |@^ @^ @^ @^ ================= Jan Feb Mar Apr Legend #: iPad Downloads @: iPhone Downloads ^: Android Downloads
Stacked column charts are great for displaying the contributions of parts of a whole (eg. how much each product line contributed to the total revenue). Clustered column charts excel at being the most comprehensible while comparing the absolute values visually.
Checkout Google Chart Tools and Google Visualization
for instance you can specify the following:
cht=bvs
chco=4D89F9,C6D9FD
chd=t:10,50,60,80,40|
50,60,100,40,20
chds=0,160
let's say if you change the chd to
cht=bvs
chs=250x150
chco=4D89F9,C6D9FD
chd=t:0,50,0,80,0, 10, 50, 40
60,0,100,0,20, 50, 100, 60
chds=0,160
Take a look at the chart above (as if its a group chart, but actually its stacked). Then you can append data after to create stacked 'looking' group as the graph is intended.
Hey I just developed grouped+stacked bar chart on d3.js.
Source
Demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With