`getLabelForValue` returns the wrong format in time scale
- Dominant language
- JavaScript
- Stars
- 67.7k
- Forks
- 11.9k
- Avg merge
- 7h 39m
- Merged PRs (30d)
- 5
Description
### Expected behavior
Calling `timeScale.getLabelForValue(value)` should return a value formatted with the format in `options.displayFormats` for the current time unit.
### Current behavior
Calling `timeScale.getLabelForValue(value)` returns a value in the `datetime` format, instead of the format defined in `options.displayFormats` for the current time unit.
### Reproducible sample
https://codepen.io/Adrien-Minne/pen/jEWrqRK
### Optional extra steps/info to reproduce
_No response_
### Possible solution
Probably a simple change in [time scale](
https://github.com/chartjs/Chart.js/blob/e27526986d9951ca2fc9f8abf4108dff0db061a8/src/scales/scale.time.js#L502) is needed
### Context
_No response_
### chart.js version
v4.5.0
### Browser name and version
Google chrome Version 140.0.7339.185
### Link to your project
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.