score:0

Accepted answer

add label with your data to show it in the tooltip

var doughnutdata = [{
    value: 30,
    color: "#f91942",
    label: 'red'
}, {
    value: 50,
    color: "#0b7bb5",
    label: 'yellow'
}, {
    value: 120,
    color: "#4d5360",
    label: 'blue'
}];

this will display tooltip with default template

<%if (label){%><%=label%>: <%}%><%= value %>

which show like

red: 30

you can change the template using tooltiptemplate key, like below

var options: {
  tooltiptemplate: "this value is -> <%= value %>"
};
var mydoughnut = new chart(document.getelementbyid("canvas").getcontext("2d")).doughnut(data, options);

this will give you

this value is -> 50


Related Query

More Query from same tag