【发布时间】:2021-04-23 10:12:28
【问题描述】:
我正在尝试使用 REST API 设置图表数据,但出现以下错误: “SeriesAbandsOptions”类型上不存在属性“数据”
ngOnInit(): void {
this.chartService.getMostFrequentUpdateData().subscribe(
(data: ChartData[]) => {
if(this.chartOptions.series){
this.chartOptions.series[0].data = data;
}
}
);
}
我在.data 上收到错误消息。
为清楚起见,这是我的图表:
chartOptions: Options = {
title: {
text: 'CDF of the most frequent update frequency',
style: {
color: 'whitesmoke'
}
},
chart: {
type: 'line',
zoomType: 'x',
backgroundColor: '#323232',
},
...
series: [
{
name: 'Frequency of the most frequent update in the sequence (upd/min)',
type: 'line',
data: [],
color: '#009879',
}
],
}
【问题讨论】:
-
SeriesAbandsOptions是什么? -
@JosephBudin 我不知道
-
你能在 stackblitz 上重现这个问题吗
-
@OwenKelvin 这是链接,不幸的是我在导入时遇到了一些错误,它们似乎没有意义stackblitz.com/edit/…
-
你能分享一个公共回购我试图重现这个问题吗?
标签: angular typescript highcharts data-binding