Skip to content

Weird curve path if "max" limit is set for line chart #11273

@rgwebcode

Description

@rgwebcode

Expected behavior

If the max limit is set for the x axis of a line chart, and the tension is set, or cubicInterpolationMode is set to monotone, then there's a weird curve path at the end of the graph.
If you have two lines on the chart, and you deselect one of them and then reselect it, the lines are being redrawn, and the curve path straightens out to what it should like from the beginning.

This is how it then looks and how I expected it to look without interaction:
image

Current behavior

And this is how it looks like initially:
image

Reproducible sample

https://codepen.io/rgwebcode/pen/mdzpzrQ

Optional extra steps/info to reproduce

Happens both in standalone Chart.js and react-chartjs-2.

Possible solution

No response

Context

No response

chart.js version

v4.3.0

Browser name and version

Chrome 112.0.5615.138 & Firefox

Link to your project

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions