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 2022/04/02 09:21:28 UTC

[GitHub] [echarts] life-as-flowers opened a new issue #16770: [Bug] 文档中series缺少realtimeSort字段,但是示例代码中有,为什么不集成到axis的realtimeSort和sortSeriesIndex呢

life-as-flowers opened a new issue #16770:
URL: https://github.com/apache/echarts/issues/16770


   ### Version
   
   5.3.1
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   ```js
   // 该示例是官方文档中的 实时排序柱状图 代码
   var data = [];
   for (let i = 0; i < 5; ++i) {
     data.push(Math.round(Math.random() * 200));
   }
   
   option = {
     xAxis: {
       max: 'dataMax'
     },
     yAxis: {
       type: 'category',
       data: ['A', 'B', 'C', 'D', 'E'],
       inverse: true,
       animationDuration: 300,
       animationDurationUpdate: 300,
       max: 2 // only the largest 3 bars will be displayed
     },
     series: [
       {
         realtimeSort: true,
         name: 'X',
         type: 'bar',
         data: data,
         label: {
           show: true,
           position: 'right',
           valueAnimation: true
         }
       }
     ],
     legend: {
       show: true
     },
     animationDuration: 3000,
     animationDurationUpdate: 3000,
     animationEasing: 'linear',
     animationEasingUpdate: 'linear'
   };
   
   function update() {
     var data = option.series[0].data;
     for (var i = 0; i < data.length; ++i) {
       if (Math.random() > 0.9) {
         data[i] += Math.round(Math.random() * 2000);
       } else {
         data[i] += Math.round(Math.random() * 200);
       }
     }
     myChart.setOption(option);
   }
   
   setInterval(function() {
     update();
   }, 3000);
   ```
   ### Current Behavior
   
   1、官方文档中series 没有 realtimeSort 字段说明,但是实例中使用了;
   2、文档中axis的realtimeSort 和 sortSeriesIndex 只针对 type: value 使用,针对category无效;
   
   
   ### Expected Behavior
   
   1、文档中 series 标出 realtimeSort 字段;
   2、希望能把 series 中的 realtimeSort 集成到 axis 的 realtimeSort 和 sortSeriesIndex 字段,针对 type: value, type: category 都可以使用(放在 series 中感觉很奇怪,而且以后兼容多系列排序时,还要新加优先级设置);
   
   ### Environment
   
   ```markdown
   - OS:win7
   - Browser: chrome 99
   - Framework:vue 2.6.11
   ```
   
   
   ### Any additional comments?
   
   _No response_


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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


[GitHub] [echarts] plainheart commented on issue #16770: [Bug] 文档中series缺少realtimeSort字段,但是示例代码中有,为什么不集成到axis的realtimeSort和sortSeriesIndex呢

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #16770:
URL: https://github.com/apache/echarts/issues/16770#issuecomment-1086598339


   Fixed in https://github.com/apache/echarts-doc/commit/90d2b3fdd68a89e5ba0b88ea251643b9db54070d


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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


[GitHub] [echarts] plainheart closed issue #16770: [Bug] 文档中series缺少realtimeSort字段,但是示例代码中有,为什么不集成到axis的realtimeSort和sortSeriesIndex呢

Posted by GitBox <gi...@apache.org>.
plainheart closed issue #16770:
URL: https://github.com/apache/echarts/issues/16770


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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


[GitHub] [echarts] echarts-bot[bot] commented on issue #16770: [Bug] 文档中series缺少realtimeSort字段,但是示例代码中有,为什么不集成到axis的realtimeSort和sortSeriesIndex呢

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #16770:
URL: https://github.com/apache/echarts/issues/16770#issuecomment-1082550610


   @life-as-flowers It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **TITLE**
   
   [Bug] The series is missing the realtimeSort field in the documentation, but there is a sample code, why not integrate the realtimeSort and sortSeriesIndex into the axis?
   </details>


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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