does vAxis.format support something similar to ChoiceFormat?

38 views
Skip to first unread message

Fred R

unread,
Apr 22, 2012, 9:21:17 PM4/22/12
to google-visua...@googlegroups.com
I want to be able to change the labels on vAxis from a number to a text based on a range. For instance, the 50 gridline should have the label 'good' and 51 to 100 will have the label 'moderate', etc. 

If I can't do this in format what is another way I can do this?

TIA,
Fred

asgallant

unread,
Apr 23, 2012, 10:37:27 AM4/23/12
to google-visua...@googlegroups.com
To the best of my knowledge, the vAxis only supports formats according to the ICU pattern set.  I don't think there is any way to do what you want with them, but if you find one, please share it with the group.

Fred R

unread,
Apr 23, 2012, 11:16:33 AM4/23/12
to google-visua...@googlegroups.com
Thanks for your reply. ICU pattern set does support such a thing via ChoiceFormat but I've never used and I'm not sure how to even approach it. I can't find any examples of it. If any one knows what the format looks like please chime in. 

Thanks,
FR

Fred R

unread,
Apr 23, 2012, 11:17:55 AM4/23/12
to google-visua...@googlegroups.com
One more thing. So assuming that the ChoiceFormat doesn't work out. I'm assuming there is no way to change a grid lines label. Correct?

FR

asgallant

unread,
Apr 23, 2012, 12:43:33 PM4/23/12
to google-visua...@googlegroups.com
The docs say the format takes a string from a (unspecified) subset of the ICU pattern set; I think they meant the decimal format pattern set specifically, but I could be wrong.  In any event, I couldn't figure out a way to get the ChoiceFormat to work.

In answer to your followup question, the vAxis.format option is the only means to set, change, or adjust the axis labels.
Reply all
Reply to author
Forward
0 new messages