gpt4 book ai didi

javascript - 如何更改重新图表中水平线之间的高度?

转载 作者:行者123 更新时间:2023-12-05 09:27:28 26 4
gpt4 key购买 nike

我有这张图,需要更改水平线之间的高度。

enter image description here

LIVE DEMO

<CartesianGrid vertical={false} />
<XAxis dataKey="name" />
<YAxis />
<Tooltip />
<Legend />
<Line
type="monotone"
dataKey="pv"
stroke="#8884d8"
/>

最佳答案

我认为通过更改 LineChart 的高度属性可以实现您的目标:

export default function App() {
return (
<LineChart
width={500}
height={250}
data={data}
margin={{
top: 5,
right: 30,
left: 20,
bottom: 5
}}

enter image description here

export default function App() {
return (
<LineChart
width={500}
height={400}
data={data}
margin={{
top: 5,
right: 30,
left: 20,
bottom: 5
}}

enter image description here

关于javascript - 如何更改重新图表中水平线之间的高度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72407042/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com