Here's the documentation for creating the JSON string for a DataTable:
https://developers.google.com/chart/interactive/docs/reference#dataparam
On Monday, December 17, 2012 7:48:08 AM UTC-5, ah89 wrote:
>
> Hi,
>
> I have a question about the combination of Google Visualization API and
> JSON.
>
> At the moment I use the following DataTable for setting up a Pie Chart:
>
> var data = new google.visualization.DataTable();
> data.addColumn('string', 'Topping');
> data.addColumn('number', 'Slices');
> data.addRows([
> ['Mushrooms', 3],
> ['Onions', 1],
> ['Olives', 1],
> ['Zucchini', 1],
> ['Pepperoni', 2]
> ]);
>
> Instead of using a DataTable, I would like to use JSON in my J2EE
> application.
> How can I accomplish this? I know how I can setup a JSON string, but not
> when there are both rows and columns in play.
> Hopefully someone will help me.
>
> Thanks in advance!
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/4zbyYI5ylUAJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.