我正在尝试使用角度图(ngx-charts-bar-vertical-stacked)在堆叠垂直条形图中显示计数报告,但出现以下错误:
动态构建数据,例如 //app.ts 我声明
array chartDataNGX:any[];
然后在构造函数调用getChatrtData()
然后在getchartdata我去像
this.chartDataNGX.push(
{"name": "TEST2","series": [
{"name": "Target","value": 40632},
{"name": "Actual","value": 36953},
{"name": "Projected","value": 31476}
]},
{"name": "TEST3","series": [
{"name": "Target","value": 40632},
{"name": "Actual","value": 36953},
{"name": "Projected","value": 31476}
]
});
它因“无法读取未定义的属性“长度”而失败,那我做错了什么?
请帮忙。