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/05/18 03:49:54 UTC

[GitHub] [echarts] aoiu opened a new issue #14975: The label position is wrong when one of the data is 0

aoiu opened a new issue #14975:
URL: https://github.com/apache/echarts/issues/14975


   ### Version
   5.1.1
   
   ### Reproduction link
   [https://codepen.io/aoiu/pen/RwpGjOj](https://codepen.io/aoiu/pen/RwpGjOj)
   
   ### Steps to reproduce
   type: bar
   
   the chart has 2 series in 1 stack
   
   the first series of datas is positive or 0, the second series of datas is negative or 0;
   
   the first series label position is 'top'; the second series label is 'bottom';
   
   when the first data is positive and the second data is 0, the label of the second data is wrong
   
   类型:柱状图
   
   两组数据在同一个stack中
   
   第一组数据为正数或0,第二组数据为负数或0;
   
   第一组label位置为'top',第二组label位置为'bottom';
   
   当第一个数据为正数而第二个数据为0时,第二个数据的label显示位置错误
   
   ### What is expected?
   the label of the second data (0) will below the xAxis
   
   第二个数据的label在横坐标下方
   
   ### What is actually happening?
   the label of the second data (0) is in the top of the first data's bar
   
   第二个数据的label在第一个数据的柱状的顶部
   
   ![img](https://i.ibb.co/rbcpCYX/2021-05-18.png)
   
   ---
   the option is as follows:
   
   option如下:
   
   ```
   var option = {
     xAxis: {
       type: 'category',
       data: ['Mon', 'Tue', 'Wed', 'Thu']
     },
     yAxis: {
       type: 'value'
     },
     series: [{
       data: [120, 0, 200, 0],
       type: 'bar',
       stack: 'test',
       label: {
        show: true,
        position: 'top'
      }
     },
    {
      data: [-120, 0, 0, -100],
      type: 'bar',
      stack: 'test',
      label: {
        show: true,
        position: 'bottom'
      }
    }]
   };
   ```
   
   <!-- 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] [echarts] echarts-bot[bot] commented on issue #14975: The label position is wrong when one of the data is 0

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






-- 
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] [echarts] pissang commented on issue #14975: The label position is wrong when one of the data is 0

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


   @aoiu 因为你设置了 stack,所以在前一个系列上堆叠了


-- 
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] [echarts] aoiu commented on issue #14975: The label position is wrong when one of the data is 0

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


   > @aoiu 因为你设置了 stack,所以在前一个系列上堆叠了
   
   为什么正数和0是在前一个顶部为起点堆叠; 负数是从X坐标轴为起点堆叠?


-- 
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] [echarts] pissang closed issue #14975: The label position is wrong when one of the data is 0

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


   


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