MrNiebit opened a new issue #13999: URL: https://github.com/apache/incubator-echarts/issues/13999
The code example on the official website can't run normally locally。 the website is [https://echarts.apache.org/examples/zh/editor.html?c=doc-example/tutorial-dynamic-data](https://echarts.apache.org/examples/zh/editor.html?c=doc-example/tutorial-dynamic-data) Correct code ```javascript var base = +new Date(2014, 9, 3); var oneDay = 24 * 3600 * 1000; var date = []; var data = [Math.random() * 150]; var now = new Date(base); function addData(shift) { now = [now.getFullYear(), now.getMonth() + 1, now.getDate()].join('/'); date.push(now); data.push((Math.random() - 0.4) * 10 + data[data.length - 1]); if (shift) { date.shift(); data.shift(); } now = new Date(+new Date(now) + oneDay); } for (var i = 1; i < 100; i++) { addData(); } option = { xAxis: { type: 'category', boundaryGap: false, data: date }, yAxis: { boundaryGap: [0, '50%'], type: 'value' }, series: [ { name:'成交', type:'line', smooth:true, symbol: 'none', stack: 'a', areaStyle: { normal: {} }, data: data } ] }; setInterval(function () { addData(true); myChart.setOption(option); }, 500); ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
