Results 1 to 4 of 4

Thread: Tooltip content size not known

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    111

    Question Tooltip content size not known

    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
    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>');      
                }
              }

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    You shouldn't be passing <html></html> tags. The tooltip should flow with the text it is given.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    111

    Question multiline tooltip

    For multiline tooltip, how should I format it? Adding \\n does not seem to work.

  4. #4
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    Use HTML.. <br>
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •