Greetings!
When I hover over one of the 5 bars in my chart, I get a popup that
says something like
Twitter:
Count: 12345
-OR-
Facebook:
Count: 54321
Say I wanted to customize that to say:
Twitter
Count: 12345 tweets
-OR-
Facebook:
Count: 54321 Posts
How would I go about that?
Current relevant code:
var gdata = new google.visualization.DataTable();
gdata.addColumn('string','Source');
gdata.addColumn('number', 'Count');
gdata.addRows(5);
gdata.setCell(0,0,'Twitter');
gdata.setCell(1,0,'Facebook');
gdata.setCell(2,0,'Blogs');
gdata.setCell(3,0,'Images');
gdata.setCell(4,0,'Videos');
gdata.setCell(0,1,twitter);
gdata.setCell(1,1,facebook);
gdata.setCell(2,1,blogs);
gdata.setCell(3,1,images);
gdata.setCell(4,1,videos);
SourceChart = new
google.visualization.BarChart(document.getElementById('src'));
SourceChart.draw(gdata, {
chartArea: {width: 240, height: 159,
top:20,left:80},
width: 360,
height: 250,
legend: 'none',
vAxis:
{textStyle:{fontName:'helvetica',fontSize:'13'}}
});
google.visualization.events.addListener(SourceChart, 'onmouseover',
barMouseOver);
google.visualization.events.addListener(SourceChart, 'onmouseout',
barMouseOut);
function barMouseOver(e) {
SourceChart.setSelection([e]);
}
function barMouseOut(e) {
SourceChart.setSelection([{'row': null, 'column': null}]);
}
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.