your option
is not used at all, that is, you have never set xAxis
and yAxis
information to line_chart
. Every time you setOption
, you only set series
information, so you will report an error.
so, you need to set the configuration item of option
once at first:
var option = {
....
series: [{
data: data.slice(data.length - 7), //
type: 'line'
}]
}
line_chart.setOption(option)
setInterval(function () {
...
}, 500);
Previous: Python2.7.6 install tornado report Tornado requires an up-to-date SSL module.
Next: How does React+Antd clear all Select option boxes on the page?