Home forums Report Bugs HTML Tooltip broken

This topic contains 3 replies, has 3 voices, and was last updated by  schuerle 1 month, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #14468

    schuerle
    Member

    Hello CanvasJS-Team,

    in one of the last releases the tooltip with html-content is broken.
    (Switched from v1.9.5.1 GA to v1.9.7 GA)

    Testcase:
    http://jsfiddle.net/h0jwajxn/

    You changed function ToolTip.prototype.getToolTipInnerHTML
    These are the relevant lines:
    `this.content = toolTipContent;
    for (var i = 0; i < this.chart.data.length; i++) {
    this.chart.data[i].toolTipContent = this.content;
    }`

    Fix:
    `this.content = toolTipContent || toolTipInnerHtml;
    for (var i = 0; i < this.chart.data.length; i++) {
    this.chart.data[i].toolTipContent = this.content;
    }`

    Please add the fix to your code-base, too.

    Thanks

    #14471

    Vishwas R
    Keymaster

    @schuerle,

    It seems to be working fine. I think you have confused contentFormatter with content. contentFormatter is a function whereas content is an attribute. Please refer this updated jsfiddle for the same.

    If you are still facing any issue, kindly create a jsfiddle reproducing the same so that we can look into it and help you out.

    #14480

    toplu sms
    Member

    Thank You @vishwas R.

    #14485

    schuerle
    Member

    @vishwas
    your right. Thanks!
    Switching the from content to contentFormater works, too.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.