How to change Google Charts number format for controllers?
NickName:Omar Trejo Ask DateTime:2015-06-11T07:05:01

How to change Google Charts number format for controllers?

When implementing a dashboard using Google Charts we are able to change the format of displayed quantities in tables with google.visualization.NumberFormat().

However, we haven't been able to find a way to change number formats in controllers. We would like to accomplish what the image shows:

enter image description here

We looked in the documentation for Google Charts controllers, but we couldn't find anything helpful for this. Any help is appreciated. :)

Copyright Notice:Content Author:「Omar Trejo」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30768807/how-to-change-google-charts-number-format-for-controllers

Answers
Henrik Aronsson 2015-06-15T11:09:54

The google API has a built in function for this.\n\noptions:{\n ui:{\n format:{\n prefix:'$',\n }\n }\n\n\nDid a small fiddle for it, link.\n\nMore info about configuration here and here.",


More about “How to change Google Charts number format for controllers?” related questions

How to change Google Charts number format for controllers?

When implementing a dashboard using Google Charts we are able to change the format of displayed quantities in tables with google.visualization.NumberFormat(). However, we haven't been able to fin...

Show Detail

Google Charts API datetime unix format?

I'm having a hard time getting Google Charts to understand the datetime format. I used an example [1] where the datetime format is set to a simple month day and year, but I changed it to take an in...

Show Detail

Change to a 24 hour format for datetime data in Google Charts

Im plotting data with javascript using the Google Charts API. The default format for datetime data view is the 12 hour am/pm format. How can I change the view to show a 24 hour format? An example o...

Show Detail

Number format of axis - Google Gauge

I am trying to change the number format of the axis on a google gauge. By default, the axis value is a whole number (e.g. 0, 120) but I would like to show a £ sign and format as currency (e.g. £0, ...

Show Detail

Google charts tooltips number format scientific

How do you set the google charts' tooltips number format to 'scientific'? I have tried the google.visualization.NumberFormat but did not have any luck. I can set the vAxis fine as shown here: chart...

Show Detail

Currency format in google charts vs angular

I'm trying to add currency format in google charts and angularjs Google charts display Money not Percentages var formatter = new google.visualization.NumberFormat({ prefix: '$' }); format...

Show Detail

Change google charts options not working

I've created a google chart and the data is pulled from a database and structured to meet the requirements of the chart, however, for some reason, whenever I try change the options for the chart it...

Show Detail

With ng2-google-charts how do I format the number as a percentage?

With ng2-google-charts and angular 10 how do I format the number as a percentage? I'm using 'GeoChart' as the chart type. The chart interface is public geoChart: GoogleChartInterface = { chartType: '

Show Detail

Google charts numbers

i use a google charts for getting data from google analytics to see it in my website there is some data have a decimal number how to make the charts forgot the number after the decimal. I use a ...

Show Detail

How to draw an unknown number of charts using charts.js (or google charts) with a loop

I'm not really after code but got myself into a loop (no pun). I'm hoping that by the time I write this down, I'll work it out. I'm trying to think how to draw a number of charts to show a student's

Show Detail