chartjs / chartjs/chartjs-chart-financial
Y-Axis auto scaling excludes datapoint at scale.x.max
- Dominant language
- JavaScript
- Stars
- 809
- Forks
- 199
- PR merge metrics
- No merged PRs in 30d
Description
I'm fiddling with min and max properties of the timeseries scale at the moment and I've come across a weird behaviour.
When setting the `scale.x.max` property to the `x` value of any datapoint, that datapoint is being ignored when the y-axis does its auto scaling.
Here's a minimal example: https://stackblitz.com/edit/vitejs-vite-yzysxr?file=src%2Fmain.ts
Uncomment line 32 to see the problem.


I'd appreciate if anyone could look into this :)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the minimal StackBlitz example linked in the issue and uncomment line 32 to reproduce the scaling problem. Trace how the timeseries scale's x.max boundary is used when calculating y-axis auto-scaling. Done means the datapoint whose x value equals scale.x.max is included in the y-axis range, with the example showing correct scaling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100