You can change to the ComboChart by replacing "BarChart" with "ComboChart"
in the ChartWrapper's "chartType" parameter, but your data isn't formatted
correctly to take advantage of the ComboChart. To make a chart like the
one in the link, you have to restructure your data so that each bar color
is represented by a column of data in your chart:
var data = google.visualization.arrayToDataTable([
['Month', 'Bolivia', 'Ecuador', 'Madagascar', 'Papua New Guinea',
'Rwanda', 'Average'],
['2004/05', 165, 938, 522, 998,
450, 614.6],
['2005/06', 135, 1120, 599, 1268,
288, 682],
['2006/07', 157, 1167, 587, 807,
397, 623],
['2007/08', 139, 1110, 615, 968,
215, 609.4],
['2008/09', 136, 691, 629, 1026,
366, 569.6]
]);
See how each country has its own column? That is how you have to structure
your data to take advantage of the ComboChart.
On Tuesday, July 30, 2013 8:24:05 AM UTC-4, armon d wrote:
>
> hello
>
> I want to use "PieChart", "ComboChart" and "Control" in a such way that
> "Control" would be able to adjust "Pie" and "Combo". The problem starts
> when my Database in like this:
> ['Name', 'Age', 'date', 'ville'],
> ['Michael' , 12, 2012, 'A'],
> ['Elisa', 20, 2012, 'B'],
> ['Robert', 7, 2012, 'A'],
> ['Michael', 54, 2013, 'A'],
> ['Elisa', 22, 2013, 'E'],
> ['Robert', 3, 2013, 'F'],
> ['Michael', 42, 2014, 'G'],
> ['Elisa', 33, 2014, 'H'],
> ['Robert', 42, 2014, 'G']
>
> I wish "ComboCahrt" to perform like what this link illustrates:
>
> https://google-developers.appspot.com/chart/interactive/docs/gallery/combochart
>
> Having such the output, we need to retrieve a query for the
> "ComboChart". My script is found in this link
> http://jsfiddle.net/alirezamoussaei/SNRRr/1/
>
> I will be appreciated it if you could make changes to correct the code:
> ...
> P.S: I employed "BarChart" in my code. Please let me know how to change
> it to "ComboChart".
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.