There are a number of avenues available. The easiest is to use the
formatters (
http://code.google.com/apis/chart/interactive/docs/reference.html#formatters),
which will format your data for you according to the parameters you
specify. You can also manually format the output using the
DataTable#setFormattedValue method or by entering values into the table as
an object: {v: value, f: 'string formatted value'}. The third option is to
use the 'tooltip' column role type to create your own. From what you said,
though, formatters should work fine for you. Use them like this:
// format the second column as a percent
var formatter = new google.visualization.NumberFormat({
pattern: '#,###%'
});
formatter.format(data, 1);
On Wednesday, March 28, 2012 1:15:00 PM UTC-4, Emily Yount wrote:
>
> Is it possible to alter the text that feeds into google charts tooltips?
> I'm working with dollar amounts and would like to show the numbers with a
> dollar sign in front of them. Likewise, there are situations where I would
> prefer the percent sign after a value rather than "Percent: 52", which is
> simply pulling in the string value from the data table.
>
> Thanks,
> Emily
>
--
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/-/FVULOEKd7wUJ.
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.