I am trying to build a scatter charts, with lines drawn between
points, for two sets of values over time. The problem is the values
don't come through at the same time necessarily. One second both
values may exist, but another second only one value will exist. This
causes disconnects in the lines between the points of each set of
values. I should also mention I am using JSON and not populating the
table with any kind of addRow js functions.
My question is this: Is there a way in a scatter chart to represent a
"null" value or simply a missing value so that the line will be drawn
without a point being placed? I realize this is complicated and rather
difficult to explain so here is an example of what I mean.
{"cols":[
{"id":"dt_log_time","label":"Log Time","type":"datetime"},
{"id":"nu_value_1","label":"Value 1","type":"number"},
{"id":"nu_value_2","label":"Value 2","type":"number"}],
"rows":[
{"c":[{"v":"Date(2011,9,26,15,02,43)","f":"10\/26\/2011 15:02:46"},
{"v":52,"f":"52"},{"v":41,"f":"41"}]},
{"c":[{"v":"Date(2011,9,26,15,02,44)","f":"10\/26\/2011 15:02:45"},{},
{"v":46,"f":"46"}]},
{"c":[{"v":"Date(2011,9,26,15,02,45)","f":"10\/26\/2011 15:02:44"},
{"v":44,"f":"44"},{}]},
{"c":[{"v":"Date(2011,9,26,15,02,46)","f":"10\/26\/2011 15:02:43"},
{"v":45,"f":"45"},{"v":46,"f":"46"}]}]}
Drawing a scatter chart with that JSON data, all of the proper points
are shown. However, you will notice that (assuming lineWidth>0) no
line is drawn between the 1st and 3rd points for "Value 1" and the 2nd
and 4th points for "Value 2" due to the missing data points. In my
example, I have represented the missing values with an empty {} but I
have tried false, null, and several other options to no avail as well.
Is there a way to achieve what I am looking for or is this a
limitation of scatter plots?
Thanks for the help.
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
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.