Rounding Mean numbers

13 views
Skip to first unread message

ch...@1over0.com

unread,
Feb 24, 2016, 3:59:21 PM2/24/16
to Google Visualization API
I have dynamic charts on a page, and a couple of them round to 17 decimal places.  I can't figure out a way to keep them rounded to at most hundredths.  Any help would be appreciated!

Chris
quickfacts.js

Daniel LaLiberte

unread,
Feb 24, 2016, 4:13:54 PM2/24/16
to Google Visualization API
Hi Chris,

Where are these numbers showing up, in tick labels or in tooltips?  You have to handle each case slightly differently.  The tick labels can be formatted by using an option like this:

  hAxis: { format: '#.##' }  // use #.00 if you want to always show 2 digits after the decimal point.

For tooltips, you'll need to specify the formatting of each value.  One way you can do this is documented here:  https://developers.google.com/chart/interactive/docs/reference#formatters


On Wed, Feb 24, 2016 at 3:59 PM, <ch...@1over0.com> wrote:
I have dynamic charts on a page, and a couple of them round to 17 decimal places.  I can't figure out a way to keep them rounded to at most hundredths.  Any help would be appreciated!

Chris

--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
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/325b6b3f-aebc-40a9-b57d-c069432b812a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages