【发布时间】:2023-02-03 19:17:17
【问题描述】:
我有以下图表,我想在其中摆脱购物车顶部的区域空间 - 我希望图表以该区域垂直结束:
const data = [{ y: 0 }, { y: 60 }, { y: 50 }, { y: 50 }, { y: 120 }, { y: 30 }, { y: 0 }];
<ResponsiveContainer width="100%" height="100%">
<AreaChart data={data} margin={{ top: 0, left: 0, bottom: 0, right: 0 }}>
<Area
dataKey="y"
type="basis"
stroke={colors.lime400}
fill={colors.lime400}
fillOpacity={0.3}
isAnimationActive={false}
/>
<CartesianGrid stroke={colors.gray300} horizontal={false} />
</AreaChart>
</ResponsiveContainer>
【问题讨论】:
标签: javascript typescript recharts