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/09/10 08:20:57 UTC

[GitHub] [echarts] tmtron commented on issue #15707: Vertical align of axis name not possible

tmtron commented on issue #15707:
URL: https://github.com/apache/echarts/issues/15707#issuecomment-916724008


   I found a way to make this work: https://jsfiddle.net/tmtron/93qu02dw/15/
   
   The **horizontal** aligment is easy and works as expected:
   * `nameLocation: 'end'`
   * `nameTextStyle.align: 'right'`
   * set `nameGap=0`: the default is 15 and would move the label too far to the right
   
   These **vertical** alignment settings work as expected
   * `verticalAlign: 'top'`
   *  `padding: [30, 0, 0, 0]`: set top-padding to move the text down
   
   ```
     xAxis: {
       name: '123456789123456789',
       nameLocation: 'end',
       nameTextStyle: {
         align: 'right',
         verticalAlign: 'top',
         /**
          * the top padding will shift the name down so that it does not overlap with the axis-labels
          * t-l-b-r
          */
         padding: [30, 0, 0, 0],
       },
       // the default nameGap=15 would move the text to the right
       nameGap: 0
     }
   ```


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