sxmpasch commented on issue #9341: events defined by `chart.on(eventName, ...` are not triggered URL: https://github.com/apache/incubator-echarts/issues/9341#issuecomment-436387827 Hmm, it still works for me. But I have set the finished event handler before setting the option...: ``` <!doctype HTML5> <html> <head> <script src="./echarts-en.min.js"></script> <script type="text/javascript"> function init() { console.log("init"); console.log('started loading'); var myChart = echarts.init(document.getElementById('chart1'), null, { "devicePixelRatio": null, "renderer": "canvas", "width": null, "height": "600px" }); myChart.on('finished', function (params){ console.log('finished loading'); }); myChart.setOption({ "title": { "text": "test", }, "grid": [ { "top": "5%", "height": "60%", "width": "60%", "left": "5%", "containLabel": false, "borderColor": "transparent", "show": "1" } ], "xAxis": [ { "type": "category", "min": "dataMin", "max": "dataMax" } ], "yAxis": [ { "type": "value", } ], // "series": {"name": "insufficient_data", "type": "bar", "data": [[1, 2], [2, 3]]}, // this works // "series": {"name": "insufficient_data", "type": "bar", "data": []}, // this doesn't work // "series": {"name": "insufficient_data", "type": "bar"}, // this neither }); console.log('options set'); }; </script> </head> <body onload="init()"> <h1>Test</h1> <div id="chart1" style="width:480px; height:480px"></div> </body> </html> ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@echarts.apache.org For additional commands, e-mail: dev-h...@echarts.apache.org