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 2021/08/21 18:11:01 UTC

[GitHub] [echarts] 100pah opened a new issue #15572: Label position does not reasonable when both positive and negative value stacked together.

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


   ### Version
   5.1.2
   
   ### Steps to reproduce
   ```js
   
                   var option = {
                       xAxis: {
                           type: 'category',
                           data: ['a', 'b', 'c']
                       },
                       yAxis: {
                           inverse: true
                       },
                       legend: {
                       },
                       series: [{
                           type: 'bar',
                           stack: 'all',
                           data: [
                               10, 20, 30
                           ],
                           label: {
                               show: true,
                               fontSize: 30
                           },
                           name: 'positive'
                       }, {
                           type: 'bar',
                           stack: 'all',
                           label: {
                               show: true,
                               fontSize: 30
                           },
                           data: [
                               -10, 0, -15
                           ],
                           name: 'negative'
                       }]
                   };
   ```
   
   <img width="890" alt="Screen Shot 2021-08-22 at 2 05 24 AM" src="https://user-images.githubusercontent.com/1956569/130331136-add9294a-1721-4f4d-bc66-e8779db6e731.png">
   
   Key point of reproduce:
   + `yAxis.inverse: true`
   + The two series are stacked and the one has positive values and the other has negative values.
   
   When value is 0, we count it as "positive stack". But we may make it more wise that determine it by other values in the same series. (If other values is negative, then 0 should belongs to "negative stack").
   
   
   <!-- 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.

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