reactchartjs/react-chartjs-2

[Bug]: Remembering options at charts based on same element

iBreadInside opened this issue · 0 comments

Would you like to work on a fix?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

Current and expected behavior

Current behavior:
Few same chart components renders with same options.

Expected behavior:
Providing different options as props causes different charts visualization.

Sandbox: https://codesandbox.io/p/sandbox/same-chart-components-different-options-6l3y5g?file=%2Fsrc%2FApp.js%3A11%2C55

Reproduction

  1. Make a chart component with options as a prop; 2. Render two or more of it; 3. Provide different options as a props;

chart.js version

4.4.0

react-chartjs-2 version

5.1.0

Possible solution

No response