Home forums Using CanvasJS Is it possible to display the toolTips for every point at once?

This topic contains 4 replies, has 3 voices, and was last updated by  ayy 2 months, 3 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #22367

    ayy
    Member

    I’m trying to display the toolTip for all points on a graph at once, without having to hover over individual points. Is this possible to do? I was thinking that it may be possible to do this by triggering mouseover events for all the points in a graph, but I’m not sure how to go about this.

    #22369

    kevin.jhang
    Member

    toolTip: {
    shared: true,
    contentFormatter: function (e) {
    let a = “”;
    for (let b of e.chart.options.data)
    {
    for (let c of b.dataPoints) {
    a += b.name + “>” + c.x + “:” + c.y + “<br/>”;
    }
    }
    return a;
    }
    }

    #22383

    ayy
    Member

    Thanks for the response, but that’s not exactly what I looking for. I trying to do something like this: https://i.imgur.com/Tn5GPNB.png

    Where every points’ individual toolTip is visible without having to hover over the points.

    #22391

    Vishwas R
    Keymaster

    @ayy,

    You can use indexLabels to show information about dataPoint ratherthan trying to show toolTip at every dataPoint. Please take a look at this jsfiddle.


    Vishwas R
    Team CanvasJS

    #22400

    ayy
    Member

    This is perfect. Thanks!

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

You must be logged in to reply to this topic.