尽管使用了边距和填充,但我无法将标签从 x 轴向下移动(例如 30px)。
<XAxis
dataKey="week_of_year"
tick={{ fontSize: '12px' }}
>
<Label
position='insideBottom'
offset={10}
value="Week of year"
style={{ fontSize: '80%', fill: 'black', padding: '100px' }}
/>
</XAxis>
非常感谢您的建议!
您可以使用
dx
的
dy
和
<Label />
属性
例如:
<Label
value='Dollars'
offset={-10}
dx={20}
dy={20}
position="insideBottomLeft"
fontSize={14}
/>