'How to remove axis line from Rechart React graph?
How to remove line from x-axis to only have the values left for the UI?
<AreaChart
data={data}
margin={{
top: 10,
left: 0,
bottom: 0,
}}
>
<Tooltip />
<XAxis dataKey="name"/>
<Area type="monotone" dataKey="uv" stroke="#814587" strokeWidth={3} />
</AreaChart>
Solution 1:[1]
I found a solution by setting the tickLine
and axisLine
attributes of XAxis
to false:
<XAxis dataKey="name" tickLine={false} axisLine={false} />
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Henry Ecker |