Chartjs pie chart tooltip mode label

👍:0

use following for Pie chart:

var data = {
labels: [
    "Red",
    "Blue",
    "Yellow"
]}

👍:0

 var data = [{
     value: 300,
     color: "#F7464A",
     highlight: "#FF5A5E",
     label: "Red"
 }, {
     value: 50,
     color: "#46BFBD",
     highlight: "#5AD3D1",
     label: "Green"
 }, {
     value: 100,
     color: "#FDB45C",
     highlight: "#FFC870",
     label: "Yellow"
 }];

Here label act as tooltip

Leave a comment