|
Title ='' can you use <*br*> |
Posted by icm63 on Jan-08-2012 08:55 |
|
My code
myLayer1.setHTMLImageMap("", "", " title='{xLabel|mm/dd/yyyy},<*br*> SwingPoint:${value|2},<*br*> Chg:{field0|1}%,<*br*> Bars:{field1|0},<*br*> Price:{field2|2}'")
I wish to show this tooltip (or scatter layer title) to show on multiple lines, by using the <*br*> but that didnt work (nor did \\n or <br/>)
Any ideas?? |
Re: Title ='' can you use <*br*> |
Posted by Peter Kwan on Jan-10-2012 01:10 |
|
Hi icm63,
The <*br*> is an CDML feature. It works only for contents rendered by ChartDirector, which works on the server side. For web applications, the tooltips are rendered by the browser, not by ChartDirector, so CDML is not applicable. ChartDirector mere sends instructions to the browser to inform it to draw tooltips. In your current code, you are sending HTML instructions to the browser (as HTML title attributes). This title attribute is a standard way to show tooltips. However, as far as I know, as according to the HTML standard, the HTML title attribute does not support line breaks for tooltips.
If you would need to have line breaks, instead of using the standard HTML tooltip, the common method is to use Javascript to draw a pop up box and put the text in it to emulate the tooltip box. There should plenty of Javascript tooltip library in the Internet (try Google for it). If you are using such library, instead of using the title attribute, you would need to use the attribute as required by your library.
Hope this can help.
Regards
Peter Kwan |
|