I’m looking to format my data in which I replace numbers with icons.
As far as I can tell Google do not currently have a formatter to do so:
http://code.google.com/apis/chart/interactive/docs/reference.html#formatters
There is a brief mention within the documents about custom formatters, but I cannot seem to find any documents on how to begin writting a custom formatters.
Can anyone point me in the right direction?
There is a similar question on StackOverflow: Write a custom formatter for Google Charts Api . However the question was resolved simply using the built-in formatters (which I don’t think I can use).
I don’t think you’ll be able to make the current formatters to do what you want, but you should be able to make your own formatter easily enough. I put together iconFormatter below for a sample – this could be adjusted to do whatever you need really.
Hope that helps.