Hi,
Firebug gives me this error when I try to capture a selection from an
event if I'm using a scatter chart embedded in a widget. The same
code seems to work fine if I use it in the Code Playground. Is there
an easy way around this?
Error is:
Element referenced by ID/NAME in the global scope. Use W3C standard
document.getElementById() instead.
[Break on this error] var selection = visualization.getSelection();\n
My Code:
var view = new google.visualization.DataView(data);
view.setColumns([3, 4])
var visualization = new google.visualization.ScatterChart
(document.getElementById('visualization'));
visualization.draw(view, {titleX: 'g-r', titleY: 'r-i', legend:
'none'});
google.visualization.events.addListener(visualization, 'select',
selectHandler);
}
function selectHandler(){
var selection = visualization.getSelection();
alert(selection.length);
}
thanks
-Conor
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---