How to show tooltips in Chart.js?

前端 未结 3 1723
再見小時候
再見小時候 2021-01-12 17:14

Following the tutorial this code draws the line chart, but no tooltips. Am I missing some configuration option here? In the tutorial there are tooltips showing up.



        
3条回答
  •  [愿得一人]
    2021-01-12 17:18

    You just need to put backgroundColor with a single value instead a array:

    datasets: [{
        label: "# of beauty womens",
        data: [12, 5, 3],
        backgroundColor: "#FC940B",
        fill: false,
        borderColor: "#FC940B"
    }]
    

    Hugs...

提交回复
热议问题