Skip to content

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

@iBreadInside

Description

@iBreadInside

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions