我一直在尝试从c3网站,但它不起作用,这是我的代码
在模板中
<vue-c3 :handler="handler"></vue-c3>
然后在脚本中
<script>
import VueC3 from 'vue-c3'
export default {
name: 'Dashboard',
props: ['handler'],
components:{ VueC3 },
data() {
return {
}
},
methods: {
initChart(){
const options = {
data: {
columns: [
['data1', 2, 4, 1, 5, 2, 1],
['data2', 7, 2, 4, 6, 10, 1]
],
},
}
this.handler.$emit('init', options)
}
},
mounted() {
this.initChart();
}
};
</script>
图表没有呈现,有什么问题?