常见问题汇总
保证数据格式是正确的,不然会报错
[Vue warn]: Error in onLoad hook: "TypeError: Cannot read property 'constructor' of undefined"
(found in pages/testPage/charts.vue)(env: macOS,mp,1.06.2409140; lib: 3.6.1)
比如 玫瑰图 ,他是有一个 data 嵌套
// 错误
Rose: {
series: [{"name":"一班","value":50},{"name":"二班","value":30},{"name":"三班","value":20},{"name":"四班","value":18},{"name":"五班","value":8}]
}
// 正确
Rose1: {
series: [{
data: [{"name":"一班","value":50},{"name":"二班","value":30},{"name":"三班","value":20},{"name":"四班","value":18},{"name":"五班","value":8}]
}]
},
但是这种也不报错