• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Tool tip custom formatting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tool tip custom formatting

    I am trying to add a couple of data points to the tooltip of a chart but it seems to be ignoring the line break.

    Is this a correct syntax?

    return rec.get('LF9WKAVG') + '<br>' + rec.get('LF9WKDAYS') + ' Work days';

    Thanks,

    Behyar
    Attached Files

  • #2
    If you want to have multiple lines in the tooltip you need to return an array with each item.

    Example:
    Code:
        return [rec.get('LF9WKAVG'), rec.get('LF9WKDAYS') + ' Work days'];

    Comment


    • #3
      In the next 6.0 update, you will be able to return an object from your custom tooltip format giving you the ability to set many sections of the tooltip;
      Property Description
      beforeTitle text before the title
      title value of title
      afterTitle text after the title
      beforeBody text before the body
      beforeLabel text before the label
      label value of the label
      afterLabel text after the label
      afterBody text after the body
      beforeFooter text before the footer
      footer value of the footer
      afterFooter text after the footer
      Example
      Code:
      return {
          beforeTitle : 'CNX Corporation',
          label       : seriesLabel + ': ' + value,
          afterLabel  : ' ',
          afterBody   : rec.get('COLONE'),
          footer      : rec.get('COLTWO')
      }

      Comment

      Working...
      X