-
Notifications
You must be signed in to change notification settings - Fork 19.8k
Description
Version
5.5.1
Link to Minimal Reproduction
Steps to Reproduce
The problem appears when there are a lot of points on the chart, and the window size is small enough.
In the above example:
- resize the chart area or adjust the 'numberOfPoints' variable in the example
- colored ares are not behind the same datapoints as they were before the change
Current Behavior
When X-axis has a lot of points on the chart and/or chart window is small enough, the markArea background is not displayed in the correct spot.

Background colors move as the chart is resized. The most obvious one is yellow - it should be behind points 5 and 6, but sometimes disappears completely and sometimes it is shown over points 4 and 7 as well.
Zoomed in view(using the dataZoom tool) is shown correctly:

Zoomed out - on the left, the yellow area is not visible at all and on the right it overlaps over points 4 and 7:

Expected Behavior
markArea should be scaled at the same rate as the barchart itself, so marked areas are always shown behind the same bars.
In the provided example, the bars at 5 and 6 should always have yellow background.
Environment
- OS: macOS Sonoma
- Browser: Firefox 131, Chrome 129, Safari 17.2.1Any additional comments?
No response