1๐
I run it on "react-chartjs-2": "^5.2.0", on React TS project:
Just add In option for your chart grid display:false
const options = {
scales: {
y: {
grid: {
display: false
}
},
x: {
grid: {
display: false
}
},
}
}
<Line options={options} data={data}/>
0๐
Tried your snippet but its not working in react-chartjs-2
v5.2
Solution: you can simply raplace xAxes, yAxes
with x,y
and instead of gridLines
with grid
inside scales
scales: {
x: {
grid: {
display: false
}
},
y: {
grid: {
display: false
}
}
}
I removed gridlines here: removed gridlines here
Source:stackexchange.com