1👍
Aftera more detailed study of the documentation on the advice
kikon, it became clear that the dimensions of the wrong solution were being transferred to convas. It is enough to set responsive options: true,
support AspectRatio: false and wrap the chart in a class with 100% width
- [Chartjs]-Chart.js bar chart change color based on value
- [Chartjs]-Chart.js scatter chart – displaying label specific to point in tooltip
0👍
try to set the width and the height of the canvas
<Bar
options={options}
data={data}
style={{
minWidth: "100%",
height: "100%",
marginLeft: "auto",
marginRight: "auto",
marginTop: "auto",
marginBottom: "auto",
}}
width ={600}
height={400}
/>
Source:stackexchange.com