The PieChart supports HTML tooltips, but they only work for the text you add to a 'tooltip' column. It doesn't work with the data itself.
Some charts support the 'allowHtml' option at the top level, to display values as html. The Table chart is an example. The reason they can support HTML is that they are rendered in HTML, whereas most charts use SVG, and the HTML tooltips are an exception because they actually use HTML to render the tooltips. It seems reasonable to support HTML entities in string values, translated automatically to the equivalent unicode characters, and we should have an option for that but we don't. But I believe you should be able to use the equivalent unicode characters yourself instead of the HTML entities. The bolding you might want with <b>OMB</b> won't work except for HTML. On Wed, Mar 29, 2017 at 10:59 PM, Alfredo Concha <[email protected]> wrote: > Hi Daniel! > > Thanks for your quick answer. We are using a PieChart: > > var data = new google.visualization.DataTable('$DATA'); > var options = { > 'pointSize': 6, > 'showLables': 'true', > 'vAxis': {format: '$###,###,###'}, > 'legend': {position: 'labeled'}, > 'chartArea': {'left': '5%', 'width': '80%', 'height': '80%'} > }; > > var chart = new google.visualization.PieChart(document.getElementById( > 'pie_chart')); > chart.draw(data, options); > > See this image: > > https://cdn.pbrd.co/images/Pu3YqEmNS.png > The right text it's fine, the left text its not being interpreted. > > I activated the isHtml option for the tooltip, but it did not helped > > tooltip: {isHtml: true} > > And when you say format the value, what should I format? it's a string. > > Thanks! =) > > > El miércoles, 29 de marzo de 2017, 23:24:48 (UTC-3), Daniel LaLiberte > escribió: >> >> Hi Alfredo, >> >> What chart are you using? That makes a lot of difference in how the text >> of your data values is processed. >> >> You might try adding the "f" property to specify the formatted value. It >> might be handled differently from how text is formatted by default. >> >> You generally have to specify that you have HTML in your text with the >> isHtml option. Otherwise it will be encoded for safety. >> >> On Wed, Mar 29, 2017 at 10:20 PM, Alfredo Concha <[email protected]> >> wrote: >> >>> Hi! >>> >>> I have this information to show (info with accents and signs): >>> >>> {"c":[{"v":"MERCADÓ LIBRE <b>OMG<\/b"'> >>> (14)"},{ >>> >>> It should output: >>> MERCADÓ LIBRE <b>OMG</b"'> >>> >>> Instead of that, I have 2 interpretations on code: >>> On the graphics: >>> MERCADÓ LIBRE <b>OMG<\/b"'> (14) >>> >>> And on a right side where I get and write the output >>> MERCADÓ LIBRE <b>OMG</b"'> >>> >>> The info on the JSON it's right, should be encoded but on the graphics >>> should be decoded! like on the right side where I write some details about >>> the info. >>> >>> How can I write the right interpretation on the graphics? Thanks! >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Google Visualization API" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at https://groups.google.com/grou >>> p/google-visualization-api. >>> To view this discussion on the web visit https://groups.google.com/d/ms >>> gid/google-visualization-api/f1f97073-afb2-4787-a7c6-fa9c69 >>> 5617d1%40googlegroups.com >>> <https://groups.google.com/d/msgid/google-visualization-api/f1f97073-afb2-4787-a7c6-fa9c695617d1%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> >> [email protected] 5CC, Cambridge MA >> > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to google-visualization-api@ > googlegroups.com. > Visit this group at https://groups.google.com/ > group/google-visualization-api. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/google-visualization-api/b82a4337-6099-4db3-85f7- > d0ed3bafb40c%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/b82a4337-6099-4db3-85f7-d0ed3bafb40c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> [email protected] <[email protected]> 5CC, Cambridge MA -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJM0dF-9fLNpy%3Dy1xfEqo9xFiE7GJt%2BxVwGG%3DRWCLV4nTw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
