For a more complete example of using selectHandler, see this page: https://developers.google.com/chart/interactive/docs/basic_interactivity
My example below get the labels from the row and the columns. I used this to send the user to another link and drill-down.
// this is an example of a bar chart's selectHandler function
function selectHandler() {
var selection = chart.getSelection();
var item = selection[0];
if (item.row != null && item.column != null) {
var rowLabel = parseInt(data.getValue(item.row, 0));
var columnLabel = data.getColumnLabel(item.column);
}
}
google.visualization.events.addListener(chart, 'select', selectHandler);
Excellent and useful blog admin, I would like to read more about this topic.
ReplyDeleteccna Training in Chennai
ccna course in Chennai
Python Classes in Chennai
Python Training Institute in Chennai
R Training in Chennai
R Programming Training in Chennai
CCNA Training in T Nagar
CCNA Training in OMR