[Chartjs]-Chart JS React loss of quality when stretching graphics

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

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}
  />

Leave a comment