Display percentage symbol [%] on the y-axis value in google table

Can anyone help get a percentage symbol[%]on the y axis.

I attached png. in the fact that in the y axis 0 t0 18values ​​I want to see it as from 0% to 18%. http://i.stack.imgur.com/pF6U0.png

+3
source share
2 answers

You need to format in two places: data and axis. To format the data, use NumberFormatter:

var formatter = new google.visualization.NumberFormat({pattern: '#%'});
// format column 1 of the DataTable
formatter.format(data, 1);

Format the axis values ​​with the option vAxis.format:

vAxis: {
    format: '#%'
}
+2
source

There is no need for a line google.visualization, google.visualizationonly the following line:

vAxis: {
    format: "#'%'"
}

: . format ICU ( GChart), . , % 100 ICU. , , % ( )

0

All Articles