[Chartjs]-Display labels on bar chart using Chart.js

2👍

If you have a single dataset set the tooltipTemplate in the options.

If you have several datasets set the multiTooltipTemplate in the options.

var options = {
  scaleLabel : "<%= value + '$' %>",
  // String - Template string for single tooltips
  tooltipTemplate: "<%if (label){%><%=label %>: <%}%><%= value + '$' %>",
  // String - Template string for multiple tooltips
  multiTooltipTemplate: "<%= value + '$' %>",
};

See an example here.

And the documentation here.

Leave a comment