You need to use a "select" event handler for the chart:
google.visualization.events.addListener(chart, 'select', function () {
var selection = chart.getSelection();
// selection is an array of objects
// iterate over the array in case there are zero (an element was
deselected) or multiple selections
for (var i = 0; i < selection.length; i++) {
// selection[i].row is the row index, if row is null, then the user
clicked on the legend
// selection[i].column is the column index, if column is null, then
the user clicked on a domain axis label
// do something with selected element
}
});
On Monday, May 26, 2014 10:21:17 AM UTC-4, Ananya Ojha wrote:
>
> i am using google charts, for every data points(circles) I want to be able
> to click on that and open a light box showing some data. Can anybody help?
>
--
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.
For more options, visit https://groups.google.com/d/optout.