我可以用两种颜色更改Chart.js的同一行吗?

时间:2019-06-02 08:04:33

标签: chart.js

我有一个折线图也代表2018年的单位,我可以更改特定月份数据的颜色。数据如下所示

data: {
    labels: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
    datasets: [{
      label: "Units",
      lineTension: 0.3,
      backgroundColor: "rgba(78, 115, 223, 0.05)",
      borderColor: "rgba(78, 115, 223, 1)",
      pointRadius: 3,
      pointBackgroundColor: "rgba(78, 115, 223, 1)",
      pointBorderColor: "rgba(78, 115, 223, 1)",
      pointHoverRadius: 3,
      pointHoverBackgroundColor: "rgba(78, 115, 223, 1)",
      pointHoverBorderColor: "rgba(78, 115, 223, 1)",
      pointHitRadius: 10,
      pointBorderWidth: 2,
      data: [11,2,34,57,3,33,67,12,2,2,66,44]
    }],
  },

0 个答案:

没有答案