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/11/24 12:15:42 UTC

[GitHub] [incubator-echarts] 100pah opened a new issue #13678: realtimeSort log axis issue

100pah opened a new issue #13678:
URL: https://github.com/apache/incubator-echarts/issues/13678


   ### Version
   5.0.0
   
   ### Steps to reproduce
   When the value is 0, NaN will be calculated in graphic element and attached text, and they will be positioned on the left-top most corner of the canvas. What's more, the the value become none-zero, the graphic elements can not render normally.
   
   Example:
   incubator-echarts-examples `next` branch:
   http://127.0.0.1:3002/en/editor.html?c=covid-america
   Need change the `yAxis.type` as `'log'`.
   
   
   
   <!-- 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:
users@infra.apache.org



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


[GitHub] [incubator-echarts] 100pah commented on issue #13678: realtimeSort log axis issue

Posted by GitBox <gi...@apache.org>.
100pah commented on issue #13678:
URL: https://github.com/apache/incubator-echarts/issues/13678#issuecomment-757116526


   
   ![image](https://user-images.githubusercontent.com/1956569/104087075-17a30b80-5298-11eb-8654-1a7099814a90.png)
   
   
   To fix this issue, we might:
   
   + See `LogScale['unionExtentFromData']`: we might add param to the method `List['getApproximateExtent']` and `List['getDataExtent']` to union data without that `<= 0`. Otherwise the logScale extent will not be correct (e.g., [-Infinity, 10]).
   + Either 
       + In `BarView`, check wether the el has invalid layout (has NaN) and mark as `ignore`.
       + In `zrender`, if the Path has invalid shape params (NaN), do not render them.
   + Fix the animation that from a NaN prop.
   
   Test case:
   ```js
               require([
                   'echarts'
               ], function (echarts) {
                   var data = [0, 1, 10, 100, 1000];
                   var option = {
                       xAxis: {
                           type: 'log'
                       },
                       yAxis: {
                           type: 'category',
                           data: ['a', 'b', 'c', 'd', 'e']
                       },
                       series: [{
                           type: 'bar',
                           data: data,
                           label: { show: true, position: 'right' }
                       }]
                   };
   
                   var chart = testHelper.create(echarts, 'main1', {
                       title: [
                           'click "all +10"',
                           'check the x extent should be correct',
                           'the 0 bar should be displayed with animation'
                       ],
                       option: option,
                       buttons: [{
                           text: 'all +10',
                           onclick: function () {
                               for (var i = 0; i < data.length; i++) {
                                   data[i] += 10;
                               }
                               chart.setOption({
                                   series: {
                                       data: data
                                   }
                               });
                           }
                       }]
                   });
               });
   
   ```


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


[GitHub] [incubator-echarts] 100pah edited a comment on issue #13678: realtimeSort log axis issue

Posted by GitBox <gi...@apache.org>.
100pah edited a comment on issue #13678:
URL: https://github.com/apache/incubator-echarts/issues/13678#issuecomment-757116526


   ![image](https://user-images.githubusercontent.com/1956569/104087075-17a30b80-5298-11eb-8654-1a7099814a90.png)
   
   
   To fix this issue, we might:
   
   + See `LogScale['unionExtentFromData']`: we might add param to the method `List['getApproximateExtent']` and `List['getDataExtent']` to union data without that `<= 0`. Otherwise the logScale extent will not be correct (e.g., [-Infinity, 10]).
   + Either 
       + In `BarView`, check wether the el has invalid layout (has NaN) and mark as `ignore`.
       + In `zrender`, if the Path has invalid shape params (NaN), do not render them.
   + Fix the animation that from a NaN prop.
   
   Test case:
   ```js
               require([
                   'echarts'
               ], function (echarts) {
                   var data = [0, 1, 10, 100, 1000];
                   var option = {
                       xAxis: {
                           type: 'log'
                       },
                       yAxis: {
                           type: 'category',
                           data: ['a', 'b', 'c', 'd', 'e']
                       },
                       series: [{
                           type: 'bar',
                           data: data,
                           label: { show: true, position: 'right' }
                       }]
                   };
   
                   var chart = testHelper.create(echarts, 'main1', {
                       title: [
                           'click "all +10"',
                           'check the x extent should be correct',
                           'the 0 bar should be displayed with animation'
                       ],
                       option: option,
                       buttons: [{
                           text: 'all +10',
                           onclick: function () {
                               for (var i = 0; i < data.length; i++) {
                                   data[i] += 10;
                               }
                               chart.setOption({
                                   series: {
                                       data: data
                                   }
                               });
                           }
                       }]
                   });
               });
   
   ```
   
   @pissang What's your opinion?


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


[GitHub] [incubator-echarts] 100pah edited a comment on issue #13678: realtimeSort log axis issue

Posted by GitBox <gi...@apache.org>.
100pah edited a comment on issue #13678:
URL: https://github.com/apache/incubator-echarts/issues/13678#issuecomment-757116526


   ![image](https://user-images.githubusercontent.com/1956569/104087075-17a30b80-5298-11eb-8654-1a7099814a90.png)
   
   
   To fix this issue, we might:
   
   + See `LogScale['unionExtentFromData']`: we might add param to the method `List['getApproximateExtent']` and `List['getDataExtent']` to union data without that `<= 0`. Otherwise the logScale extent will not be correct (e.g., [-Infinity, 10]).
   + Either 
       + In `BarView`, check wether the el has invalid layout (has NaN) and mark as `ignore`.
       + In `zrender`, if the Path has invalid shape params (NaN), do not render them.
   + Fix the animation that from a NaN prop.
   
   Test case:
   ```js
               require([
                   'echarts'
               ], function (echarts) {
                   var data = [0, 1, 10, 100, 1000];
                   var option = {
                       xAxis: {
                           type: 'log'
                       },
                       yAxis: {
                           type: 'category',
                           data: ['a', 'b', 'c', 'd', 'e']
                       },
                       series: [{
                           type: 'bar',
                           data: data,
                           label: { show: true, position: 'right' }
                       }]
                   };
   
                   var chart = testHelper.create(echarts, 'main1', {
                       title: [
                           'click "all +10"',
                           'check the x extent should be correct',
                           'the 0 bar should be displayed with animation'
                       ],
                       option: option,
                       buttons: [{
                           text: 'all +10',
                           onclick: function () {
                               for (var i = 0; i < data.length; i++) {
                                   data[i] += 10;
                               }
                               chart.setOption({
                                   series: {
                                       data: data
                                   }
                               });
                           }
                       }]
                   });
               });
   
   ```
   
   @pissang What's your opinion?


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


[GitHub] [incubator-echarts] 100pah commented on issue #13678: realtimeSort log axis issue

Posted by GitBox <gi...@apache.org>.
100pah commented on issue #13678:
URL: https://github.com/apache/incubator-echarts/issues/13678#issuecomment-757116526


   
   ![image](https://user-images.githubusercontent.com/1956569/104087075-17a30b80-5298-11eb-8654-1a7099814a90.png)
   
   
   To fix this issue, we might:
   
   + See `LogScale['unionExtentFromData']`: we might add param to the method `List['getApproximateExtent']` and `List['getDataExtent']` to union data without that `<= 0`. Otherwise the logScale extent will not be correct (e.g., [-Infinity, 10]).
   + Either 
       + In `BarView`, check wether the el has invalid layout (has NaN) and mark as `ignore`.
       + In `zrender`, if the Path has invalid shape params (NaN), do not render them.
   + Fix the animation that from a NaN prop.
   
   Test case:
   ```js
               require([
                   'echarts'
               ], function (echarts) {
                   var data = [0, 1, 10, 100, 1000];
                   var option = {
                       xAxis: {
                           type: 'log'
                       },
                       yAxis: {
                           type: 'category',
                           data: ['a', 'b', 'c', 'd', 'e']
                       },
                       series: [{
                           type: 'bar',
                           data: data,
                           label: { show: true, position: 'right' }
                       }]
                   };
   
                   var chart = testHelper.create(echarts, 'main1', {
                       title: [
                           'click "all +10"',
                           'check the x extent should be correct',
                           'the 0 bar should be displayed with animation'
                       ],
                       option: option,
                       buttons: [{
                           text: 'all +10',
                           onclick: function () {
                               for (var i = 0; i < data.length; i++) {
                                   data[i] += 10;
                               }
                               chart.setOption({
                                   series: {
                                       data: data
                                   }
                               });
                           }
                       }]
                   });
               });
   
   ```


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