Data sets with independent x-axis values on same chart

22 views
Skip to first unread message

butk...@gmail.com

unread,
Jan 6, 2017, 11:19:03 AM1/6/17
to Google Visualization API
Is there a way to create a scatter chart with 2 sets of data that do not share the same x-axis values? I am trying the graph a temperature vs. time relationship and a humidity vs. time relationship, with data points that do not necessarily occur at the same time between data sets.

For instance, the temperature vs. time data might look something like:
[[8,30,45], 72],
[[9,0,15], 71],
[[9,21,3], 72],
[[10,1,0], 73]


And the humidity vs. time data might look something like:
[[8,32,4], 22],
[[9,10,50], 24],
[[9,27,32], 20],
[[10,5,16], 21]

Is there a way to display both of these data sets on the same chart, or should I interpolate data points so they can fit in the same table?

Daniel LaLiberte

unread,
Jan 6, 2017, 11:26:04 AM1/6/17
to Google Visualization API
Since you are using scatter chart, there is nothing to interpolate.  Just include null values in the columns that don't have data corresponding to the domain value (in column 0).

--
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-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@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/b5ce8590-077b-42cc-95fb-386ccd64f428%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

butk...@gmail.com

unread,
Jan 6, 2017, 12:18:17 PM1/6/17
to Google Visualization API
Works like a charm. Thanks!


On Friday, January 6, 2017 at 11:26:04 AM UTC-5, Daniel LaLiberte wrote:
Since you are using scatter chart, there is nothing to interpolate.  Just include null values in the columns that don't have data corresponding to the domain value (in column 0).
On Fri, Jan 6, 2017 at 11:19 AM, butk...@gmail.com <butk...@gmail.com> wrote:
Is there a way to create a scatter chart with 2 sets of data that do not share the same x-axis values? I am trying the graph a temperature vs. time relationship and a humidity vs. time relationship, with data points that do not necessarily occur at the same time between data sets.

For instance, the temperature vs. time data might look something like:
[[8,30,45], 72],
[[9,0,15], 71],
[[9,21,3], 72],
[[10,1,0], 73]


And the humidity vs. time data might look something like:
[[8,32,4], 22],
[[9,10,50], 24],
[[9,27,32], 20],
[[10,5,16], 21]

Is there a way to display both of these data sets on the same chart, or should I interpolate data points so they can fit in the same table?

--
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-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.



--
Reply all
Reply to author
Forward
0 new messages