Home Forums Report Bugs HTML Tooltip broken

HTML Tooltip broken

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

    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

    @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

    Thank You @Vishwas R.

    #14485

    @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.