You need to sign in to do that
Don't have an account?

Creating a "Stacked" Bar Chart, using Google Visualizations codeshare library
All,
I need to make a bar chart that has data grouped within each series, so that each "bar" in the chart is combination of multiple data points. I am able to do this using Google Charts, but providing the information with a clean legend is problematic, so I am investigating the use of Google Visualizations.
An example of the type of the Google Chart, without legends for the subdata making up the bars:
I stumbled upon the codeshare library for Google Visualizations (http://wiki.developerforce.com/index.php/Google_Visualizations).
I was wondering if anyone had used the ColumnChart component and related code to create this type of Chart? It looks possible, just wanted a quick sanity check before I invest in a lot of time on it.
Thanks,
David
I am facing the similar issue. I would like to use Google column chart to show stack bar.
Each stack bar has different number of sub items.
Any help would be appreciated.
Hi
I need to create a stacked bar chart. Could you please help with the required code???
I have multiple sets of code listed below. The first is my initial attempt to do the charting, without using the GoogleViz (and related components). The second set of code is an example (and supporting utility Color class) for using the GoogleViz component -- though it would need to be modified/genericed as needed.
The code below is a very "manual" way of creating the chart w/o using the GoogleViz libraries.
The next set of code assumes you are using/have the GoogleViz and JSONObject classes. It refactors some of the "color" methods from the above code into a separate utility class. The code that actually creates the chart is in a VF controller -- it really should be genericized more, but this gives you the idea. I believe we had to make a modification to the ColumnChart component provided by Google as well, so I've included that last. This was built some time ago, so I'm not sure how compaitble it is with anything that is out there.
ColorUtilties class:
ColumnChart component: