Is it possible to get the value of annotation that takes each bar when the
user clicks?
This is my code:
google.load('visualization', '1', {packages: ['corechart', 'bar']});
google.setOnLoadCallback(drawBasic);
function drawBasic() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Time of Day');
data.addColumn('number', 'Motivation Level');
data.addColumn({ type: 'string', role: 'annotation' });
data.addColumn('number', 'Motivation');
data.addColumn({ type: 'string', role: 'annotation' });
data.addRows([
["6/4/2015", 10,"e", 11, "a"] ,
["13/4/2015", 10,"f", 15, "b"] ,
["7/4/2015", 20, "g", 17,"c"] ,
["14/4/2015", 10,"h", 18,"d"] ,
["8/4/2015", 10, "i", 19,"e"] ,
]);
var chart = new google.visualization.ColumnChart(
document.getElementById('chart_div'));
chart.draw(data, null);
google.visualization.events.addListener(chart, 'select', selectHandler);
function selectHandler(e) {
}
}
--
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.