I have been trying to do a inverted line chart with react chartjs but it seems that none of the parameter "option" doesn't run at all, but all the other parameters works fine.
import React from 'react'
import { Line } from 'react-chartjs-2'
export function Sales(){
let data = {
labels: [
'Jan',
'Feb',
'Mar',
'Apr',
'May'
],
datasets:[
{
label: 'Sales for 2022',
data:[8, 5, 3, 20, 1],
borderColor: ['rgb(25, 208, 200)'],
}
],
}
const options = {
scaleShowGridLines : false,
scales: {
yAxes: [{
ticks: {
reverse: true
}
}],
}
}
return(
<div>
<Line data={data} options={options}/>
</div>
)
}