Null values are indeed the way to do it. The way to set them depends on the data table population method you use. If you use setCell() calls, you can just omit them, but the way described here is good if you use JSON initialization.
Regards, VizGuy On Thu, Dec 24, 2009 at 4:56 AM, tomas <[email protected]> wrote: > I've worked around the problem with something like this (using json): > > var data = new google.visualization.DataTable({ > > > cols: [{id: 'Date', label: 'DateTime', type: 'datetime'}, > > {id: 'data1', label: 'serie1', type: > 'number'}, > > {id: 'data2', label: 'serie2', type: > 'number'}], > > rows:[ {c:[ > {v: new Date(2009,1,1,)},{v: 2000},{}]}, > {c:[{v: new Date(2009,1,2)},{},{v: > 3000}]} > ]}) > > I just use null values in the unused series. > > hope it helps > > tomas > > > > > > On 24 dic, 06:56, qwanta <[email protected]> wrote: > > I understand you can add multiple series to the Annotated Time Line > > using the format shown in the example: > > > > data.addRows([ > > [new Date(2008, 1 ,1), 30000, 40645 ], > > [new Date(2008, 1 ,2), 14045, 20374 ], > > [new Date(2008, 1 ,3), 55022, 50766 ] > > ]); > > here the 2nd parameter is the 1st series value, the 3rd parameter is > > the 2nd series value. Both points share the same datetime value. > > > > Is it possible to add two independent series to a chart with > > independent datetime points? > > > > data1.addRows([ > > [new Date(2008, 1 ,1), 30000 ], > > [new Date(2008, 1 ,4), 14045 ], > > [new Date(2008, 1 ,13), 55022 ] > > ]); > > data2.addRows([ > > [new Date(2008, 1 ,2), 40645 ], > > [new Date(2008, 1 ,5), 20374 ], > > [new Date(2008, 1 ,7), 50766 ] > > ]); > > > > How would I add data1 & data2 to the same chart (with same y-scale)? > > Thanks. > > -- > > 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]<google-visualization-api%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-visualization-api?hl=en. > > > -- 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.
