I am creating a LineChart which will contain multiple datasets (a
variable number of sets, could be 20, average ~5 though)
Some of the datasets will be missing X-axis values, they are (Date,
value) pairs

Example: So if I have Set0 which has data for (Day0, Day1, Day2, Day3)
and Set1 only has data for (Day0, Day3) then I want to have Set1 still
draw a line between the data points that it does have, however
currently if there are day gaps the charts API won't draw the line (or
even display the dataset). I know that since I am using 'date' as the
X-Axis data type then the chart should be in continuous mode, then I
use 'chartView' to convert the X-Axis data point labels to be string
values (the X-Axis values at dataTable creation are epoch values and I
convert them to just be Month, day, year values for actual display). I
did this date to string conversion because of an example I found in
the API for the ChartRangeFilter which I am also using.

So here is what I have found: if I use LineChart and there is gaps in
the data the dataset seems to get dropped and not displayed at all,
even if I try to put null in for missing data. If I use ScatterChart
then the data points appear fine, however even if I specify a
lineWidth only data points with consecutive values will get connected
with a line (there will be enough data in this chart where it will be
too messy if there is no line). I CAN use a ScatterChart with multiple
domains which does work, but now the issue is that the
ChartRangeFilter doesn't really make sense (since it requires a
filterColumn and I need it to be able to take in several columns
rather than just one now)

Below is a simple example that can be pasted into the API playground
so you can see what I'm talking about:

so essentially in my example I have 3 'rooms' and each room only has
some data, all the data I have spans across 5 days (4/19-4/23) and I
want the data for all the rooms to show up and the points from days
where there is a gap to be linked with a line.

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  data.addColumn('date', 'Time');
  data.addColumn('number', 'Room0');
  data.addColumn('number', 'Room1');
  data.addColumn('number', 'Room2');
  data.addRows(5);

  data.setValue(0, 0, new Date(2012, 3, 19));
  data.setValue(1, 0, new Date(2012, 3, 20));
  data.setValue(2, 0, new Date(2012, 3, 21));
  data.setValue(3, 0, new Date(2012, 3, 22));
  data.setValue(4, 0, new Date(2012, 3, 23));

  //Room0
  data.setValue(0, 1, 4);
  data.setValue(1, 1, 5);

  //Room1
  data.setValue(0, 2, 3);
  data.setValue(1, 2, 2);
  data.setValue(3, 2, 3);

  //Room2
  data.setValue(3, 3, 7);
  data.setValue(4, 3, 8);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart 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-chart-api?hl=en.

Reply via email to