Editing tooltips without overwriting (and how to get rid of stacked-bar %)

33 views
Skip to first unread message

Geoffrey Palmer

unread,
Jan 11, 2023, 4:47:05 PM1/11/23
to Google Visualization API
Hi folks,

I'm looking for ways to modify the default tool tips, especially with a stacked-bar-percentage which seems to always add a "(xx%) to all tooltips that I can't get rid of. 

By default, tooltips contains the row, column, and value information. The row label (the year in that example) is bolded, as is the value . The column header ('Sales') is not.

Other than overwriting this with a column-role, is there a way to simply modify it, so it doesn't show the row name, or doesn't bold the value?

If overwriting is the best option, is there an example of the default HTML for a tooltip somewhere?

Lastly, I'm trying to show a stacked bar by percentage using the "isStacked: percent". This adds an "(xx%)" to the tool tip. It does this even if I use a column-role to add a custom tool tip - no mater what I do with a column-role the "(xx%)" still appears. Can seem to change or modify this appurtenance, other than turn the whole tool tip off. 

Ideally I want the category name, and just the percentage, which is easy to do except for the brackets. IE, using the above example, I can get the tool tip to say  "Romance: (22.02%)". But I want to get rid of the brackets!

Thanks!
Geoffrey

Reply all
Reply to author
Forward
0 new messages