Thanks Daniel, Yes the method of using a null value will work.
In the more general case the domain values of the dataset could be different. I guess the solution in this case is to interpolate the data to fit the first defined domain set. On Monday, November 16, 2015 at 10:59:46 PM UTC+9, Daniel LaLiberte wrote: > > hi asximen, > > The multiple-domain support is obviously lacking. Your best bet is > probably to not use multiple domains but instead use null values in the > series where there is no value. Here is your jsfiddle modified to do this: > https://jsfiddle.net/dlaliberte/eaqth466/2/ > > On Mon, Nov 16, 2015 at 2:12 AM, <[email protected] <javascript:>> wrote: > >> Using the scatter chart i would like to plot several sets of data with >> x,y points. When doing so I find that the first column of x points with the >> role domain sets the x axis and subsequent assignment of a column as role >> domain appears to be ignored with the next column defined as data (i.e. y >> axis values) are aligned to the first set of domain values. >> >> e.q. >> https://jsfiddle.net/eaqth466/ >> >> google.setOnLoadCallback(drawChart); >> function drawChart() { >> //var data = new google.visualization.DataTable(); >> var data = new google.visualization.DataTable({ >> cols: [{id: 'a', label: 'DomA', type: 'number', role: 'domain'}, >> {id: 'b', label: 'DataA', type: 'number', role: 'data'}, >> {id: 'c', label: 'DomB', type: 'number', role: 'domain'}, >> {id: 'd', label: 'DataB', type: 'number', role: 'data'}], >> rows: [{c:[{v: 1}, {v: 2} ,{v: 6}, {v: 1}]}, >> {c:[{v: 2}, {v: 4} ,{v: 7}, {v: 2}]}, >> {c:[{v: 3}, {v: 6} ,{v: 8}, {v: 3}]}, >> {c:[{v: 4}, {v: 8} ,{v: 9}, {v: 4}]}, >> {c:[{v: 5}, {v: 10} ,{v: 10}, {v: 5}]}] >> }, 0.6); >> >> additionally I would like to be able to display sets of x,y data with >> various lengths. In the example above I want to plot points >> {(1,2),(2,4),(4,8),(5,10)} and then points {(6,1),(7,2),(8,3),(9,4),(10,5)}. >> >> -- >> 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 [email protected] >> <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at >> http://groups.google.com/group/google-visualization-api. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/google-visualization-api/b99c59f5-e572-4c47-9c19-5de53a061890%40googlegroups.com >> >> <https://groups.google.com/d/msgid/google-visualization-api/b99c59f5-e572-4c47-9c19-5de53a061890%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> > - 978-394-1058 > [email protected] <javascript:> 5CC, Cambridge MA > [email protected] <javascript:> 9 Juniper Ridge Road, Acton MA > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/727d4d0b-9386-4c6c-823a-fcdca8eda552%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
