s5s5 opened a new issue #9324: 改 option 切换时,数据变少了
URL: https://github.com/apache/incubator-echarts/issues/9324
 
 
   <!--
   为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
   -->
   
   
   ### One-line summary [问题简述]
   
   您好,我做了一个图表显示王者荣耀的英雄胜率变化,但遇到一个问题就是反复点击英雄职业切换时,数据会变少,有大佬可以帮看看什么问题么…… 
   
   http://pvp.misuisui.com/o.html
   
   访问上面的页面点顶部导航切换英雄职业(点击时是在改 option),比如多点几次 法师,每点一次,数据就少一天,不知怎么解决,应该是不变才对。
   
   ### Version & Environment [版本及环境]
   + ECharts version [ECharts 版本]:4.1.0
   + Browser version [浏览器类型和版本]:所有浏览器
   + OS Version [操作系统类型和版本]:所有操作系统
   
   
   
   
   
   ### Expected behaviour [期望结果]
   
   数据不变少才对
   
   
   
   
   ### ECharts option [ECharts配置项]
   <!-- Copy and paste your 'echarts option' here. -->
   <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 
option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
   
   是通过 setOption 来切数据,所以代码还请直接看 http://pvp.misuisui.com/o.html ,我没压缩代码什么的
   
   ```javascript
   option = {
   {
             'color': [
               '#ff715e',
               '#ffaf51',
               '#8c6ac4',
               '#715c87',
               '#b04270',
               '#931fb0',
               '#3c1fb0',
               '#6ade41',
               '#35adad',
               '#c0d447',
               '#7687ff',
               '#70daff',
               '#31c426',
               '#416c87',
               '#b0195c',
               '#8772b0',
               '#b01114',
               '#35adad',
               '#2c8fde',
               '#57d45c'
             ],
             legend: {
               bottom: 45,
               textStyle: {
                 color: '#FFF'
               }
             },
             title: {
               text: '王者荣耀英雄胜率变化榜',
               subtext: '非官方数据,不定期更新',
               textStyle: {
                 color: '#ffaf51'
               }
             },
             grid: {
               left: 60,
               right: 85,
               top: 70,
               bottom: 140
             },
   
             dataZoom: [
               {
                 type: 'slider',
                 show: true,
                 xAxisIndex: [0],
                 start: 76,
                 end: 100
               },
               {
                 type: 'slider',
                 show: true,
                 yAxisIndex: [0],
                 start: 72,
                 end: 99
               },
               {
                 type: 'inside',
                 yAxisIndex: [0]
               }
             ],
             tooltip: {
               axisPointer: {
                 type: 'cross'
               }
             },
             dataset: {
               source: getDataset(json)
             },
             xAxis: {
               type: 'category',
               axisLine: {
                 lineStyle: {
                   color: '#333'
                 }
               },
               splitLine: {
                 lineStyle: {
                   color: ['#333']
                 }
               }
             },
             yAxis: {
               min: 40,
               max: 60,
               axisLine: {
                 lineStyle: {
                   color: '#333'
                 }
               },
               splitLine: {
                 lineStyle: {
                   color: ['#333']
                 }
               }
             },
             series: createArrayWith(getJsonLength(json), lineJson)
           }
   }
   
   ```
   
   
   
   
   ### Other comments [其他信息]
   <!-- For example: Screenshot or Online demo -->
   <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
   
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to