chartjs / chartjs/Chart.js

Line chart rendering goes haywire

Open
#11,775 0 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
JavaScript
Stars
67.7k
Forks
11.9k
Avg merge
7h 39m
Merged PRs (30d)
5

Description

### Expected behavior

The chart should display correctly like this:
![correct](https://github.com/chartjs/Chart.js/assets/95846287/184b3e0c-98d8-4c92-a48e-a02ef8eba9e8)

### Current behavior

The chart displays incorrectly like this:
![bug](https://github.com/chartjs/Chart.js/assets/95846287/d7915488-973d-4176-94ee-04392b16778b)

The problem does not occur if the last observation is removed, or if the canvas is wider, or if reverting back to chart.js v3.6.0.

### Reproducible sample

https://codepen.io/webventure-au/pen/GRaJveM

### Optional extra steps/info to reproduce

_No response_

### Possible solution

_No response_

### Context

_No response_

### chart.js version

4.4.2

### Browser name and version

chrome or firefox

### Link to your project

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.