• 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

  • Johnny Major
    replied
    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')
    }

    Leave a comment:


  • Johnny Major
    replied
    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'];

    Leave a comment:


  • behyar
    started a topic Tool tip custom formatting

    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
Working...
X