I made a chart that included 30 days of absent data and I made it using the react-chartjs-2 library but the results are not responsive how to make it responsive?
this is what it looks like on a laptop: chart on laptop
and this if it looks on mobile: chart on mobile
this is my code:
this.state = {
loadFirst: true,
loadData: false,
filterYear: moment().format('YYYY'),
filterMonth: moment().format('MM'),
filtered: {
year: moment().format('YYYY'),
month: moment().format('MM')
},
data: {},
options: {
scales: {
yAxes: [
{
stacked: true,
ticks: {
beginAtZero: true
}
}
],
xAxes: [
{
stacked: true
}
]
}
}
}
and this:
<Bar data={data} options={options} />}
how to fix it?