[Bug] yAxis axisLabel width
Version
5.5.1
Link to Minimal Reproduction
https://codesandbox.io/p/sandbox/agitated-nova-hrm3w5?file=%2Fsrc%2FApp.js%3A10%2C18
Steps to Reproduce
If I have multiple charts stacked vertically with the same X-axis and different Y-axis values, the charts won't be aligned due to the other Y-axis width. I'm using https://echarts.apache.org/en/option.html#yAxis.axisLabel.width to manually set a specific width on all the charts, but I'm not getting the expected behaviour.
Current Behavior
yAxis axisLabel width does not respect https://echarts.apache.org/en/option.html#yAxis.axisLabel.width
Expected Behavior
yAxis axisLabel should be set width https://echarts.apache.org/en/option.html#yAxis.axisLabel.width
Environment
- OS: macOS 15.0.1
- Browser: Chrome 129.0.6668.91
- Framework: Remix
Any additional comments?
No response
have you tried grid with axis sync, or connect ?
The position of the yAxis is decided by grid.left. You can set it to be larger to avoid axis labels being clipped. You may dynimically calculate the left value based on the length of the data. For example: left: data.reduce((a, b) => Math.max((a + '').length, (b + '').length), 1) * 5 + 30.
我用了这种写法还是对不齐,对齐得把containLabel设置成false