[Bug] Bar width is too wide and span accross other dates in x-axis when series has limited data points
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### Version
5.2.2
### Link to Minimal Reproduction
https://tinyurl.com/mr3h2jyk
### Steps to Reproduce
Configuration
1. x-axis is set to "time".
2. x-axis is set with "min" and "max" value.
3. series has very limited available data points within the timeframe between "min" and "max" value.
The following example is to achieve showing 2 series in bars on 12:00 a.m. each day. The described defect is occured when there is only one data point ["2024-11-22", 1000] is available in the series while the x-axis is set to be shown from "2024-11-21" to "2024-11-28".
Possible solutions by manipulating the "barWidth" & "barMaxWidth" has been tried, but the "barWidth" will be too slim when series has sufficient data points (e.g. 4 data points within "2024-11-21" and "2024-11-28").
### Current Behavior

As shown in the chart, the bars on "2024-11-22" are too wide and span accross other dates in the x-axis. The x-axis is also no longer shown from "2024-11-21" to "2024-11-28" although the "min" and "max" (or "startValue" and "endValue") are set.
### Expected Behavior

The expected behaviour is the bars with appropriate width are shown on "2024-11-22" and the x-axis shows the defined period "2024-11-21" to "2024-11-28".
### Environment
```markdown
- OS:
- Browser:
- Framework:
```
### Any additional comments?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.