Google chart displays information
I work with API of Google Chart Tools and I would like to add more information in my tooltip. I have this chart:
Now, tooltip shows Febrero, Twe开发者_运维问答ets: 184 but I would like to show on tooltip, v.gr. {Febero, Tweets: 184, Inicio campaña}
My code:
function drawVisualization() {
// Create and populate the data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Mes');
data.addColumn('number', 'Tweets');
data.addColumn('number', 'Replies');
data.addRows(4);
data.setValue(0, 0, 'Diciembre');
data.setValue(0, 1, 155);
data.setValue(0, 2, 25);
data.setValue(1, 0, 'Enero');
data.setValue(1, 1, 146);
data.setValue(1, 2, 15);
data.setValue(2, 0, 'Febrero');
data.setValue(2, 1, 184);
data.setValue(2, 2, 35);
data.setValue(3, 0, 'Marzo');
data.setValue(3, 1, 188);
data.setValue(3, 2, 43);
// Create and draw the visualization.
new google.visualization.LineChart(document.getElementById('visualization')).
draw(data, {curveType: "function",
width: 500, height: 400,
vAxis: {maxValue: 10}}
);
}
精彩评论