You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/04/28 03:49:39 UTC

[GitHub] PandaJJ5286 opened a new issue #8245: feature magicType 设置 line和stack,切换时,图形只能展示stack

PandaJJ5286 opened a new issue #8245: feature magicType 设置 line和stack,切换时,图形只能展示stack
URL: https://github.com/apache/incubator-echarts/issues/8245
 
 
   <!--
   为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
   -->
   
   
   ### One-line summary [问题简述]
   
   feature magicType 设置 line和stack,切换时,图形只能展示stack
   
   切换到stack后再次切换为line时,不生效
   
   
   
   ### Version & Environment [版本及环境]
   + ECharts version [ECharts 版本]: 3.8.5
   + Browser version [浏览器类型和版本]: macBook pro
   + OS Version [操作系统类型和版本]: chrome 65.0.3325.181
   
   
   ### Expected behaviour [期望结果]
   
   正常切换line 和 stack堆积图
   
   
   
   ### ECharts option [ECharts配置项]
   <!-- Copy and paste your 'echarts option' here. -->
   <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
   ```javascript
   option = {
       title: {
           text: '未来一周气温变化',
           subtext: '纯属虚构'
       },
       tooltip: {
           trigger: 'axis'
       },
       legend: {
           data:['最高气温','最低气温']
       },
       toolbox: {
           show: true,
           feature: {
               dataZoom: {
                   yAxisIndex: 'none'
               },
               dataView: {readOnly: false},
               magicType: {type: ['line', 'bar', 'stack']},
               restore: {},
               saveAsImage: {}
           }
       },
       xAxis:  {
           type: 'category',
           boundaryGap: false,
           data: ['周一','周二','周三','周四','周五','周六','周日']
       },
       yAxis: {
           type: 'value',
           axisLabel: {
               formatter: '{value} °C'
           }
       },
       series: [
           {
               name:'最高气温',
               type:'line',
               data:[11, 11, 15, 13, 12, 13, 10],
               markPoint: {
                   data: [
                       {type: 'max', name: '最大值'},
                       {type: 'min', name: '最小值'}
                   ]
               },
               markLine: {
                   data: [
                       {type: 'average', name: '平均值'}
                   ]
               }
           },
           {
               name:'最低气温',
               type:'line',
               data:[1, -2, 2, 5, 3, 2, 0],
               markPoint: {
                   data: [
                       {name: '周最低', value: -2, xAxis: 1, yAxis: -1.5}
                   ]
               },
               markLine: {
                   data: [
                       {type: 'average', name: '平均值'},
                       [{
                           symbol: 'none',
                           x: '90%',
                           yAxis: 'max'
                       }, {
                           symbol: 'circle',
                           label: {
                               normal: {
                                   position: 'start',
                                   formatter: '最大值'
                               }
                           },
                           type: 'max',
                           name: '最高点'
                       }]
                   ]
               }
           }
       ]
   };
   
   
   ```
   
   
   
   
   ### Other comments [其他信息]
   <!-- For example: Screenshot or Online demo -->
   <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
   ![image](https://user-images.githubusercontent.com/912572/39391683-12b7da1a-4ada-11e8-9672-a0fd47461a02.png)
   
   点击堆叠图后再次点击折线图,不能恢复为正常的折线图,并且两个图标都会高亮,这个应该怎么解决?
   

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


With regards,
Apache Git Services

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