1
I created the following chart:
var data = [
{
value: 300,
color:"#F7464A",
highlight: "#FF5A5E",
label: "Red",
subtitle: "texto"
},
{
value: 590,
color: "#46BFBD",
highlight: "#5AD3D1",
label: "Green"
},
{
value: 190,
color: "#FDB45C",
highlight: "#FFC870",
label: "Yellow"
}
];
var ctx = document.getElementById("myChart").getContext("2d");
new Chart(ctx).Doughnut(data);
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.min.js"></script>
<canvas id="myChart" width="600" height="400"></canvas>
Also, I would like to add caption on the chart as well:
But I’m not finding out how. Can anyone help me?