【发布时间】:2020-12-06 23:47:39
【问题描述】:
这里的所有示例 (https://echarts.apache.org/examples/) 都有硬编码的“系列”对象:
series: [
{
name: 'Forest',
type: 'bar',
data: [320, 332, 301, 334, 390]
},
{
name: 'Steppe',
type: 'bar',
data: [220, 182, 191, 234, 290]
},
{
name: 'Desert',
type: 'bar',
data: [150, 232, 201, 154, 190]
}]
我想动态创建这些。像这样的:
for(x=0; x < myData.length; x++){
createSeries(myData[x]);
}
这可能吗?
【问题讨论】:
标签: echarts