在chart.js上显示标题

在chart.js上显示标题,chart.js,Chart.js,我需要一些帮助。我正在使用chart.js图形和“甜甜圈”模型。我需要这些价值观​​要打印在图表上,绝对值及其相对于金额的百分比(如下面的模型所示) 有人能帮忙吗 var ctx = document.getElementById("tempoGastoNaLoja"); var myDoughnutChart2 = new Chart(ctx, { type: 'doughnut', data: { labels: [ "10min",

我需要一些帮助。我正在使用chart.js图形和“甜甜圈”模型。我需要这些价值观​​要打印在图表上,绝对值及其相对于金额的百分比(如下面的模型所示)

有人能帮忙吗

var ctx = document.getElementById("tempoGastoNaLoja");
var myDoughnutChart2 = new Chart(ctx, {
    type: 'doughnut',    
    data: {
        labels: [
    "10min",
    "30min",
    "45min",
    "1h",
    "1h30",
    "2h+"
        ],
        datasets: [
            {
                data: [80, 42, 38, 21, 15, 18],
                backgroundColor: [
                    "#ffd833",
                    "#f4b12d",
                    "#e88b28",
                    "#dd6422",
                    "#d13e1d",
                    "#c61717"
                ],
                hoverBackgroundColor: [
                    "#ffd833",
                    "#f4b12d",
                    "#e88b28",
                    "#dd6422",
                    "#d13e1d",
                    "#c61717"
                ]
            }],
        options: {
            responsive: true,
            maintainAspectRatio: false,         

        }

    }
});