문제

Look at this example https://developers.google.com/chart/interactive/docs/gallery/orgchart

I would like to know how can I add line breaks or html tags in the tooltips column. Something like this (not working):

['Alice', 'Mike', 'Text1 <br text2 '],

or

['Alice', 'Mike', 'Text1 <br> text2 '],

Column 2 - [optional] Tool-tip text to show, when a user hovers over this node.

Thanks.

도움이 되었습니까?

해결책

Tooltip from:

    ['Bob', 'Jim', 'Bob Sponge'],

is coded as:

    <td colspan="6" class="google-visualization-orgchart-node google-visualization-orgchart-node-medium" 
        title="Bob Sponge">Bob</td>

so option allowHtml:true wouldn't help. Tooltip is just plain html title attribute. So you can use unicode for line feed:

    ['Bob', 'Jim', 'Bob\u000ASponge'],
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top