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>

-- 
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/-/6K3xUooCjL4J.
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.

Reply via email to