Re: Difficulty plotting error bars/intervals on a scatterchart.

76 views
Skip to first unread message

asgallant

unread,
Jul 13, 2012, 12:25:55 PM7/13/12
to google-visua...@googlegroups.com
I believe that the "interval" role is not supported for ScatterCharts; the documentation lists it as supported for "column n" roles, but it should be "emphasis" there.

On Friday, July 13, 2012 1:43:52 AM UTC-4, Andrew Nelson wrote:
Hi,
I've been trying to plot error bars on a scatter chart (using the scatterchart playground). However, I keep getting an error: "Cannot read property type of 'null'".

There must be something simple going on. I've been trying for a while, but I'm a bit of a newbie to Javascript. Can anyone point out where I'm going wrong?
The code follows.

<code>
function drawVisualization() {
    // Create and populate the data table.
  var data = new google.visualization.DataTable();
  data.addColumn({type:'number', role:'domain'}); 
  data.addColumn({type:'number', role:'data'}); 
  data.addColumn({type:'number', role:'interval'});
  data.addColumn({type:'number', role:'interval'});

  data.addRows( [[1, 1, 0, 4],
              [2,2, 0, 4]
              ]);


    // Create and draw the visualization.
    var chart = new google.visualization.ScatterChart(
        document.getElementById('visualization'));
    chart.draw(data, {title: 'Cool shapes',
                      width: 600, height: 400,
                      vAxis: {title: "Y", titleTextStyle: {color: "green"}},
                      hAxis: {title: "X", titleTextStyle: {color: "green"}}}
              );
}
​</code>

Andrew Nelson

unread,
Jul 13, 2012, 7:26:21 PM7/13/12
to google-visua...@googlegroups.com
Thanks, 
So the API documentation is wrong?

Jinji

unread,
Jul 15, 2012, 10:58:39 AM7/15/12
to google-visua...@googlegroups.com
Yes, the documentation is wrong. Thanks for reporting! Fixed now.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/x3dEgMFWz70J.

To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.

Reply all
Reply to author
Forward
0 new messages