I want to achieve the following chart (a small 7 day chart):
For that, I started using ChartJS with React. My knowledge is limited with ChartJS.
My Line chart options are:
const options = {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
display: false
},
title: {
display: false
},
tooltips: {
enabled: false
},
},
elements: {
point:{
radius: 0
}
},
tooltips:{
enabled: false
},
hover: {mode: null},
scales: {
x: {
display: false,
},
y: {
display: false,
}
},
animation: {
duration: 0
},
parsing: {
xAxisKey: 'time',
yAxisKey: 'value'
}
}
const dataOptions = {
labels: [],
datasets: [] // i fill this when the component is mounted,
}
And then I add a chart:
<Line
data={dataOptions}
options={options}>
</Line>
I get:
I need the max and min to be adjust so it looks rather a smoother chart.
How can I achieve the first image - as mine looks very basic, and what is usual for small 7 day charts?