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/07/04 03:38:35 UTC

[GitHub] [echarts] echarts-bot[bot] commented on issue #17307: [Bug] X轴文字同时开启旋转和换行的时候,显示错位

echarts-bot[bot] commented on issue #17307:
URL: https://github.com/apache/echarts/issues/17307#issuecomment-1173303055

   @pingbaobao 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] When X-axis text is turned on at the same time as rotation and line breaks, it is misaligned
   
   **BODY**
   
   ### Version
   
   5.3.3
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   
   option = {
     xAxis: {
       type: 'category',
       data: ['2022-02 Promotional Activities', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
       axisLabel: {
         rotate: -45, // rotate
         formatter: function (val) {
             return '20\n22\n-0\nFebruary push\nwide activity\nmovement';
         },
         margin: 30
       },
     },
     yAxis: {
       type: 'value'
     },
     series: [
       {
         data: [120, 200, 150, 80, 70, 110, 130],
         type: 'bar',
         showBackground: true,
         backgroundStyle: {
           color: 'rgba(180, 180, 180, 0.2)'
         }
       }
     ]
   };
   
   ### Current Behavior
   
   ![image](https://user-images.githubusercontent.com/42052862/177077153-73c20bfd-af54-4471-8183-12d94109282f.png)
   The position of Xzho axis text will be shifted upward when rotated and wrapped at the same time
   
   ### Expected Behavior
   
   Can correctly calculate the position of the X-axis text
   
   ### Environment
   
   ````markdown
   - OS:
   - Browser:
   - Framework:
   ````
   
   
   ### Any additional comments?
   
   _No response_
   </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