我用wx-chart画图表,怎么就是不显示呢?
为啥就是不显示呢??气人
wxml:
<canvas class=“canvas” canvas-id=“pieGraph”></canvas>
js:
var Charts = require(’…/…/utils/wxcharts.js’);
onLoad: function (options) {
new Charts({
canvasId: ‘pieGraph’,
type: ‘pie’,
series: [
{ name: ‘1’, data: 15, },
{ name: ‘2’, data: 30, },
],
width: 640,
height: 640,
dataLabel: false
})
},
wxss:
.canvas {
width: 80px;
height: 80px;
}