Home Forums Chart Support how to add tooltip color

how to add tooltip color

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

    how to add tooltip color

    #38779

    contentFormatter: function (e) {
    var content = ” “;
    for (var i = 0; i < e.entries.length; i++) {
    content += e.entries[i].dataSeries.name + ” ” + “<strong style=’\”‘color: red;’\”‘>” + e.entries[i].dataPoint.y + ““;
    content += “<br/>”;
    }
    return content;
    }

    #38780

    it is not working.

    #38790

    @joinfurther,

    You can pass the color within single quote to set the font-color of the text shown in tooltip as shown in the code-snippet below:

    contentFormatter: function (e) {
        var content = " ";
        for (var i = 0; i < e.entries.length; i++) {
           content += e.entries[i].dataSeries.name + " " + "<strong style='color: red;'>" + e.entries[i].dataPoint.y + "</strong>";
           content += "<br/>";
        }
        return content;
    }


    Thangaraj Raman
    Team CanvasJS

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

You must be logged in to reply to this topic.