Hi there,
I can't seem to get my vAxis to display a percentage, but my tooltips are
displaying percentages. Anyone have an idea on how to fix? Thanks a bunch!
Here is the code:
<html>
<head>
<script type="text/javascript"
src="https://www.gstatic.com/charts/loader.js"></script>
<option value="percent">percent</option>
<script type="text/javascript">
google.charts.load('current', { 'packages': ['corechart', 'bar'] });
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var query = new
google.visualization.Query("https://docs.google.com/spreadsheets/d/1MR-iqhpvCCNWjYVOWyeYp19YlLEIKf_cqzLVk0LvF5s/edit#gid=0?range=A1:D7");
query.send(handleQueryResponse);
}
function handleQueryResponse(response) {
var data = response.getDataTable();
var chart = new
google.visualization.ColumnChart(document.getElementById('student_chart'));
var options = {
isStacked: 'false',
title: 'Number of Unique Students by Year',
curveType: 'function',
legend: { gridlines: 'bottom' },
colors: ['red', 'yellow', 'green'],
pointSize: 20,
series: {
vAxis: {format: "###'%'"},
}
};
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="student_chart" style="width: 900px; height: 500px"></div>
</body>
</html>
--
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/6967caf4-118a-4dcc-b143-fdd8d99b9351%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.