How do I join 3 2D arrays TO display 3 lines in one graph ?

4 views
Skip to first unread message

Erez V.

unread,
Mar 10, 2019, 12:40:34 PM3/10/19
to Google Visualization API
Hello,

I have a wirking code for a line graph.

Now I want to show 3 lines on the same graph.

I created the data

Is this the right way for the join of 3 2-dimentional arrays?

var data_123 = google.visualization.data.join(data1, data2, data3,'full', [[0,0]], [1], [1]);

This doesn't work either:

var data_123 = google.visualization.data.join(data1, data2, data3,'full', [[0,0]], [1], [1], [1]);


I can't understand from this explanation how to join more than 2 arrays.  Can anyone explain it to me please


is this the right way for chart draw?

chart.draw(data_123, google.charts.Line.convertOptions(options), {interpolateNulls:true});

I'm asking because these are [date, value] arrays and I added {interpolateNulls:true} since the dates are not overlapping (I hope this is the correct verb)

Thanks

Daniel LaLiberte

unread,
Mar 10, 2019, 5:18:45 PM3/10/19
to Google Visualization API
There is no method to join 3 datatables, but the result of a join of the first two datatables is a new one, so then join the new one with your third datatable.

--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/f7f2dde4-2778-4d3e-973c-4d3abd5b3aae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Reply all
Reply to author
Forward
0 new messages