Home Forums Chart Support Display string beside the y axis tool tip value Reply To: Display string beside the y axis tool tip value

#36101

@htarahi,

It is possible to add some extra content to the toolTip using contentFormatter property as shown in the code-snippet below,

 contentFormatter: function (e) {
      var content = " ";
      for (var i = 0; i < e.entries.length; i++) {
        content += CanvasJS.formatDate(e.entries[i].dataPoint.x, "DD MMM YY") + " : " + "<strong>" + e.entries[i].dataPoint.y + "</strong>" + " " + e.entries[i].dataPoint.extraContent;
        content += "<br/>";
      }
  return content;
} 

Kindly take a look at this JSFiddle for an example on rendering a chart with additional content on the toolTip.

chart with additional tooltip content


Adithya Menon
Team CanvasJS