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.
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>