PDA

View Full Version : Tooltip content size not known



sarabjeetd
16 Mar 2012, 2:47 AM
I have a chart with a tooltip which can grow or shrink. How do I lay it out so that I do not have to know the height and width in advance.
I am using setTitle to set the content. Here is the code


tips: {
trackMouse: true,
layout: 'fit',
width: 200,
height:200,
renderer: function(storeItem, item) {
this.setTitle('<html>' +
'<table>' +
'<tr>Value :' + storeItem.get('value') + ' ' + units + ' </tr>' +
'</table>' + '</html>');
}
}

mitchellsimoens
16 Mar 2012, 11:44 AM
You shouldn't be passing <html></html> tags. The tooltip should flow with the text it is given.

sarabjeetd
16 Mar 2012, 11:48 AM
For multiline tooltip, how should I format it? Adding \\n (file://\\n) does not seem to work.

mitchellsimoens
16 Mar 2012, 12:08 PM
Use HTML.. <br>