使用文档:
https://www.kancloud.cn/xchhhh/wx-chart/399337
https://github.com/xiaolin3303/wx-charts
https://gitee.com/mirrors/wx-charts/#wx-charts
参数说明: https://github.com/xiaolin3303/wx-charts/issues/56
下载 dist 里的 wx-charts-min.js
<canvas class="cav" canvas-id="radarCanvas"></canvas>]
const WxCharts = require('../../api/wx-charts.js')
const chart = new WxCharts({
canvasId: 'radarCanvas',
type: 'radar',
categories: ['title1', 'title2', 'title3', 'title4', 'title5'],
series: [{
data: [0, 0, 0, 0, 0]
}],
width: 280,
height: 280,
extra: {
radar: {
max: 10,
labelColor: '#ffffff',
gridColor: '#8382cd'
}
},
subtitleFontSize: 24,
legend: false,
fontSize: 24
})
chart.updateData({
series: [{
data: [8, 2,3,4,10]
}]
})
.cav
height 280px
max-width 100%
width 280px
margin 0 auto