您可以使Chart.js雷达图的轴单独的颜色吗?

6ojccjat  于 2022-11-07  发布在  Chart.js
关注(0)|答案(1)|浏览(145)

想要使个别axises不同的颜色,到目前为止还没有发现任何甚至接近能够挑出特定的axises在任何样本。

cig3rfwq

cig3rfwq1#

多轴配置:

const config = {
type: 'radar',
data: data,
options: {
  scales: {
    r: {
        angleLines: {
            color: ['rgba(45, 183, 87, 1)', 'rgba(78, 190, 235, 1)', 'rgba(78, 190, 235, 1)', 'rgba(78, 190, 235, 1)', 'rgba(255, 152, 49, 1)', 'rgba(255, 152, 49, 1)', 'rgba(255, 152, 49, 1)','rgba(96, 230, 225, 1)','rgba(96, 230, 225, 1)','rgba(96, 230, 225, 1)', 'rgba(45, 183, 87, 1)','rgba(45, 183, 87, 1)'],
            borderWidth: 5
        }
    }
  },
  elements: {
    line: {
      borderWidth: 3
    },
  }
},

};

相关问题