图例位置调整。
#2975
Replies: 1 comment
-
图例位置底部居中的设置方法 在 Ant Design Charts 组件中,大部分图表都可以通过 legend 配置项控制图例(Legend)的位置和布局。要实现图例底部居中,你可以设置 legend 的 position 和 layout 参数。 配置示例import { Line } from '@ant-design/charts';
const config = {
data: [
{ year: '1991', value: 3 },
{ year: '1992', value: 4 },
{ year: '1993', value: 3.5 },
// ...更多数据
],
xField: 'year',
yField: 'value',
legend: {
position: 'bottom', // 图例显示在底部
layout: 'horizontal', // 水平布局,默认即为 horizontal
},
};
<Line {...config} /> 参数说明:
相关文档链接如需针对某种具体图表组件实现上述效果,请补充说明组件类型。 此回答由AI自动生成,仅供参考。如有疑问,请等待维护者回复。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
图例位置如何底部居中?
Beta Was this translation helpful? Give feedback.
All reactions