Skip to content

Honor index axis and reversed scales in stacked fills - #12363

Open
hakarrr wants to merge 2 commits into
chartjs:masterfrom
hakarrr:fix/stacked-fill-index-axis
Open

hakarrr wants to merge 2 commits into
chartjs:masterfrom
hakarrr:fix/stacked-fill-index-axis

Conversation

@hakarrr

@hakarrr hakarrr commented Oct 25, 2026

Copy link
Copy Markdown

Description

A stacked line chart with indexAxis: 'y' does not fill the band between datasets. Stack-target construction always interpolates using x, even though the rest of the filler uses the source index axis. Its fallback boundary is also always scale.bottom, so the fallback is wrong for horizontal value scales and for reversed value scales when no lower line is visible.

Pass the source index axis to interpolation and orient the fallback boundary using the value scale's minimum pixel. This retains the existing minimum-value fallback for ordinary charts, without changing negative-stack semantics, stack membership, stepped lines, or handling of multi-segment interpolation arrays.

Tests

Sixteen pixel cases cover both index axes, independent index/value scale reversal, and visible/hidden lower datasets. Each asserts that the band is filled and the area outside it is not. Ten cases fail on unchanged master; all pass after the fix.

  • Filler suite: 92 passed.
  • Full ChromeHeadless suite: 1719 passed.
  • ESLint on both changed files passed.
  • Rollup build and TypeScript declaration emit passed.

No Firefox test run is claimed.

hakarrr and others added 2 commits October 26, 2026 03:07
Interpolate on the source index axis and orient the fallback boundary using the minimum value-scale pixel.

Co-authored-by: generaltony007 <[email protected]>
Assert the expected band is filled and outside remains unfilled for both index axes, independently reversed index/value scales, and hidden lower lines.

Co-authored-by: generaltony007 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant