Vertical axis values

55 views
Skip to first unread message

Josh Grant

unread,
May 19, 2013, 8:45:39 PM5/19/13
to Google Visualization API
Is it possible to format the values used on the vertical axis somehow?
For example, to use a numerical value in the data and to have a
formatted value be displayed instead?

E.g., the value is 120000 but the formatted value would be "120
thousand" or "120 elephants".

asgallant

unread,
May 19, 2013, 11:57:30 PM5/19/13
to google-visua...@googlegroups.com
You can use the vAxis.format option to format the vertical axis (it takes a string of ICU number pattern).  You can add in prefixes, suffixes, separators, set number of decimal places and significant figures, use exponential notation, etc.  You cannot, however, shorten a number like 120000 to "120 thousand" with the format string - you would have to manipulate your data (divide all values by 1000) and then add "thousand" as a suffix in the format.

Donna Eaker

unread,
May 9, 2016, 2:38:06 PM5/9/16
to Google Visualization API
Hi.  Not sure if I'm in the right place or not but I have some questions regarding charts in google sheets.   I have a ton of them in excel and was looking to convert/upload them into google sheets.  So, to kind of learn my way around I uploaded one of my charts and currently have 2 questions.  

1)  How do I center my chart title.   It doesn't give me that option.  Not even under advanced editing.
2)  How do I get my vertical axis to a whole number.   All I get is a little box with a min & max to choose from.  I just need to change the number from a decimal to a whole number.  I've included a picture to show what I get.


Daniel LaLiberte

unread,
May 9, 2016, 4:14:51 PM5/9/16
to Google Visualization API
Hi Donna,

Since you are using the ChartEditor through Google Sheets, you should probably ask on a forum for Sheets.   Here is a place to start: https://productforums.google.com/forum/#!forum/docs

But I can tell you what should be possible in the underlying Charts functionality.  The chart title cannot be aligned, unfortunately.    The axis ticks could be formatted with a format option, but there is a risk doing that automatically because the tick values might need the precision of a couple decimal digits.   If you specify an automatic number of gridlines (as opposed to the default of 5) you might get better tick values.

**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

--
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/afbcbc3e-041d-48c6-890b-2e303977ab9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages