wenfangdu opened a new issue #13741: URL: https://github.com/apache/incubator-echarts/issues/13741
### Version v5 ### Steps to reproduce <template> <div id="main" style="width: 600px; height: 400px"></div> </template> <script> import echarts from 'echarts' export default { mounted() { // 基于准备好的dom,初始化echarts实例 const myChart = echarts.init(document.getElementById('main')) // 指定图表的配置项和数据 const option = { title: { text: 'ECharts 入门示例', }, tooltip: {}, legend: { data: ['销量'], }, xAxis: { data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子'], }, yAxis: {}, series: [ { name: '销量', type: 'bar', data: [5, 20, 36, 10, 10, 20], }, ], } // 使用刚指定的配置项和数据显示图表。 myChart.setOption(option) }, } </script> <style lang="scss" scoped></style> ### What is expected? Works out of the box ### What is actually happening? Not working --- Works in v4 though, how to import echarts ESM in v5? <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE --> <!-- This issue is in English. DO NOT REMOVE --> ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org