gpt4 book ai didi

reactjs - 如何使用react rechart只绘制直线

转载 作者:行者123 更新时间:2023-12-04 03:06:12 25 4
gpt4 key购买 nike

我尝试使用react recharts。我需要这样的图表 chart with straight lines
但我不能画直线。我尝试使用但出了点问题

<Line  points={[{x:0, y:900}, {x:dataWithDay.lenght-1, y:900}]} stroke="gray" dot={false}/>

我不清楚数组点中的值是什么意思。如果我理解 x 和 y 是 XAxis 和 YAxis 的坐标。这条线画任何东西

最佳答案

我想你的意思是 ReferenceLine .

关于reactjs - 如何使用react rechart只绘制直线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44195238/

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