I'm using the the google.visualization.DataTable to display an orgchart and I want to highlight parts of the tooltip via html. Is this possible?
Note that I can get the title to display as html, but I cannot get the tooltip to display as html. As an example, *I get this result:* <https://lh3.googleusercontent.com/-XbRFA2Yc0pE/WeZwAshtAaI/AAAAAAAAAHU/rLEyLGlmnMg1ekupRo11NNuNl5uDU2cVgCLcBGAs/s1600/orgchart.png> *With this code:* <html> <head> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load('current', {packages:["orgchart"]}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Name'); data.addColumn('string', 'Manager'); data.addColumn({ type: 'string', role: 'tooltip', 'p': { 'html': true, 'role': 'tooltip' } }); // For each orgchart box, provide the name, manager, and tooltip to show. data.addRows([ [{v:'Mike', f:'Mike<div style="color:red; font-style:italic">President</div>'}, '', '<div style="color:green;">The President</div>'], [{v:'Jim', f:'Jim<div style="color:red; font-style:italic">Vice President</div>'}, 'Mike', 'VP'], ['Alice', 'Mike', ''], ['Bob', 'Jim', 'Bob Sponge'], ['Carol', 'Bob', ''] ]); // Create the chart. var chart = new google.visualization.OrgChart(document.getElementById('chart_div')); // Set chart settings. var options = { allowHtml:true, isHtml:true, tooltip:{isHtml:true}, } // Draw the chart, setting the allowHtml option to true for the tooltips. chart.draw(data, options ); } </script> </head> <body> <div id="chart_div"></div> </body> </html> Thank you. -- 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/ab7e9dc7-75f0-4cb9-89cd-b611dd5df696%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
