Multiple Line Graphs on the same Chart

37 views
Skip to first unread message

Ari

unread,
Apr 1, 2019, 3:02:08 PM4/1/19
to Google Visualization API
Hi All

Please see my attached diagram. Is it possible to do this?

Thanks

graph.png

Ari

unread,
Apr 1, 2019, 5:43:28 PM4/1/19
to Google Visualization API
I am struggling to find any API that supports drawing these 2 line graphs within the same chart as shown.

Looks like the x-axis range has to be same for both the line charts.

They cannot be different for the 2 line graphs when plotted in the same chart.

Is it true??

Daniel LaLiberte

unread,
Apr 2, 2019, 8:45:26 AM4/2/19
to Google Visualization API
You can certainly draw multiple line series in the same chart with Google Charts, but you also want your two line series to have different domain values.  That is also possible in Google Charts, but it is not well tested or documented.  You'll need to add a second domain axis by using the 'domain' role.   See the documentation on roles here:   https://developers.google.com/chart/interactive/docs/roles
And find the 'domain' section in the table of roles.
Reply all
Reply to author
Forward
0 new messages