You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/09/29 16:03:45 UTC

[GitHub] [incubator-echarts] pingf commented on issue #13368: chart freezed after serveral clicks of buttons in toolbox

pingf commented on issue #13368:
URL: https://github.com/apache/incubator-echarts/issues/13368#issuecomment-700806107


   ```html
   <html lang="en">
   <head>
       <meta charset="utf-8">
       <title>Using ECharts</title>
   </head>
   
   <body>
   <!-- 为ECharts准备一个具备大小的Dom-->
   <div>
   hello world
   </div>
   <div id="barChart" style="height:500px;border:1px solid #ccc;padding:10px;"></div>
   
   
   </body>
   <!--引入echarts. Using echarts-all.js for convenience -->
   <!-- CDN is taken from https://cdnjs.com/libraries/echarts -->
   
   <script src="./echarts.js"></script>
   <script>
   
       /* Bar Chart */
   
       var myBarChart = echarts.init(document.getElementById('barChart'));
   
       var barChartOption = {
           title: {
               text: '某地区蒸发量和降水量',
               subtext: '纯属虚构'
           },
           tooltip: {
               trigger: 'axis'
           },
           legend: {
               data: ['2014', '2015']
           },
           toolbox: {
               show: true,
               feature: {
                   mark: {
                       show: true
                   },
                   dataView: {
                       show: true,
                       readOnly: false
                   },
                   magicType: {
                       show: true,
                       type: ['line', 'bar', 'stack'],
                       title: {
                           line: 'line view',
                           bar: 'bar view',
                           stack: 'stack view',
                           tiled: 'tiled view',
                       },
                   },
                   restore: {
                       show: true
                   },
                   saveAsImage: {
                       show: true
                   }
               }
           },
           calculable: true,
           xAxis: [{
               type: 'category',
               data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
           }],
           yAxis: [{
               type: 'value'
           }],
           series: [{
               name: '2014',
               type: 'bar',
               data: [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],
           }, {
               name: '2015',
               type: 'bar',
               data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],
           }]
       };
   
       myBarChart.setOption(barChartOption);
   
   </script>
   </html>
   ```
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org