ECharts 设置 Y 轴名称与数值对齐
ECharts About 359 words需求
默认yAxis的name是以Y轴的竖线居中显示的。需要将名称设置为与在竖线的左侧,即:与Y轴的数值对齐。
nameTextStyple align
yAxis.nameTextStyle.align文字水平对齐方式,默认自动。
- 'left'
- 'center'
- 'right'
设置为right实现在竖线的左侧。
const option = {
yAxis: {
name: 'Y Axis Name',
nameTextStyple: {
align: 'right',
},
},
}
文档
https://echarts.apache.org/zh/option.html#yAxis.nameTextStyle
Views: 15 · Posted: 2026-02-08
———         Thanks for Reading         ———
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...