Thx, for the reply and workaround solution!
It seems like a flexible extension for a future version would be the
ability to set a formatting callback which passes as a parameter the value,
and you return whatever display value you want. Maybe that already happens
under the hood somewhere for the existing formatters, and would just need
to have a hook exposed.
function blah(val) { return (val / 1000000) + "M"; }
vAxis: {
format: 'custom("blah")'
}
On Thursday, May 10, 2012 12:21:23 PM UTC-7, asgallant wrote:
>
> Unfortunately, the only formatting you can do with the axis is via the
> vAxis.format option, which takes a string that is a pattern from a subset
> of the ICU Pattern
> Set<http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details>.
> You can transform your data manually, however, to get the units to the
> correct size, and then append the unit to the axis and tooltip values.
> See: http://jsfiddle.net/asgallant/6kyhf/
>
> On Thursday, May 10, 2012 1:57:59 PM UTC-4, caustik wrote:
>>
>> I can't for the life of me seem to find a way to transform the values
>> of vertical axis labels.
>>
>> There are formatters like "google.visualization.NumberFormat" - but it
>> doesn't seem to support custom algorithms for transforming numbers. Is
>> there any way to enumerate and manually transform labels?
>>
>> Here's a mock-up of what I'm shooting for: http://i.imgur.com/XLEno.png
>>
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/nyTlRUVXDbkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.