Re: multiple charts

46 views
Skip to first unread message

asgallant

unread,
Dec 28, 2012, 3:28:13 PM12/28/12
to google-visua...@googlegroups.com
Put each series of data into its own column.  It is fundamentally no different than using a single series of data.

On Friday, December 28, 2012 2:47:19 PM UTC-5, Arush wrote:
Please explain how to have multiple series lines for the same x axis values when using dynamic data via ajax in json through php

Arush

unread,
Dec 28, 2012, 4:11:15 PM12/28/12
to google-visua...@googlegroups.com
thanks for the reply but how do i change colour and other options for the 2 series?

Arush

unread,
Dec 28, 2012, 4:49:56 PM12/28/12
to google-visua...@googlegroups.com
For mulitple columns i get data like this but it doesnt draw both the lines ...
{ "cols": [ {"label":"Dat","type":"date","role":"annotation"}, {"label":"RETURNING VISITS","type":"number"} ], "rows": [{"c":[{"v":"Date(2012,11,28)"}, {"v": 0}]},{"c":[{"v":"Date(2012,11,29)"}, {"v": 0}]},], "cols": [ {"label":"Dat","type":"date","role":"annotation"}, {"label":"NEW VISITS","type":"number"} ], "rows": [{"c":[{"v":"Date(2012,11,28)"}, {"v": 5}]},{"c":[{"v":"Date(2012,11,29)"}, {"v": 5}]},]} 

asgallant

unread,
Dec 28, 2012, 5:45:11 PM12/28/12
to google-visua...@googlegroups.com
Your JSON isn't formatted correctly.  First of all, the annotation role isn't valid for the domain column ("Dat" in your example).  Also, you need to include all 3 column definitions together, and populate all rows with 3 columns of data, like this:

{ "cols": [ {"label":"Dat","type":"date"}, {"label":"RETURNING VISITS","type":"number"}, {"label":"NEW VISITS","type":"number"} ], "rows": [{"c":[{"v":"Date(2012,11,28)"}, {"v": 0}, {"v": 5}]},{"c":[{"v":"Date(2012,11,29)"}, {"v": 0}, {"v": 5}]}] }
Reply all
Reply to author
Forward
0 new messages