I am trying to show some texts for each series in a Google Bar Type chart.
The data I am using to create the chart is presented as below (perfectly working):
['Months', 'XXX', {type: 'string', role: 'tooltip'}, 'YYY', {type: 'string', role: 'tooltip'}, 'ZZZ', {type: 'string', role: 'tooltip'}, 'TTT', {type: 'string', role: 'tooltip'}],
['Sep', 0, '00 h 00 m', 0, '00 h 00 m', 0, '00 h 00 m', 0, '00 h 00 m']
['Oct', 0, '00 h 00 m', 0, '00 h 00 m', 0, '00 h 00 m', 0, '00 h 00 m']
...
However, I can not manage to show the tooltip (or annotation, it doesn't matter).
I tried to load a lot of versions of Google packages. I currently use the following:
google.charts.load('visualization', '1', {packages: ['corechart', 'bar']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
...
]);
var options = {
height: 300,
hAxis: {
title: 'Time'
},
vAxis: {
title: 'Flight Hours (min)'
},
title: 'Annual Statistics',
bar: { groupWidth: '90%' },
};
var chart = new google.charts.Bar(document.getElementById('myPieChart'));
chart.draw(data, google.charts.Bar.convertOptions(options));
}
Could you please help me?