You can add an "annotation" column to your data. You can use a DataView to
calculate this automatically for you:
var view = new google.visualization.DataView(dataTable);
view.setColumns([0, 1, 2, 3, {
type: 'string',
role: 'annotation',
sourceColumn: 2,
calc: function (dt, row) {
return (dt.getValue(row, 2) * 100).toFixed(1) + '%';
}
}]);
var chart = new
google.visualization.ColumnChart(document.getElementById('coverage'));
chart.draw(view, options);
Incidentally, you could take the same approach with the tooltip column as
well, since all of the values in that are based on data that exists
elsewhere in the DataTable.
On Tuesday, October 28, 2014 12:05:15 AM UTC-4, Nicole Goldup wrote:
>
> Hi there,
>
> page:
> http://www.hpvregister.org.au/research/coverage-data/hpv-vaccination-coverage-2013
>
> Is it possible to show the percentage value above each bar? e.g. like the
> attached image
>
> Thanks,
> Nicole
>
>
>
--
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.