部分折线图无法显示
html代码如下,为什么只显示出3个折线图而不是9个
<div id="frame"></div>
<script src="../static/backstage/echarts/echarts.min.js"></script>
<script>
var charts=[];
for (var i=0;i<3;++i)
{
charts.push([]);
var strs="";
for (var j=0;j<3;++j)
{
strs+="<div id='chart-"+i+"-"+j+"' style='width:300px;height:300px;'></div>";
}
document.getElementById('frame').innerHTML+=strs;
for (var j=0;j<3;++j)
{
charts[i].push(echarts.init(document.getElementById('chart-'+i+'-'+j)));
var option = {
xAxis: {
data: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
},
yAxis: {},
series: [{
type: 'line',
data: [220, 182, 191, 234, 290, 330, 310]
}]
};
charts[i][j].setOption(option);
}
}
</script>
2022-01-15 09:39:54