Bug reportOct 7, 2026· 0:29· 0 views
Chart.js 4.5.1: fill:'stack' band disappears when dataset x shifted by 1e-9 px
0:29 total
Comments · 0
Be the first to comment.
Bug report— by SceneRecap AI
mediumfiller plugin / line segment stacking logic
os: macOSbrowser: Chromium 151.0.7922.34chartjs: 4.5.1
Repro steps
- 1.Initialize a Chart.js 4.5.1 line chart with two stacked datasets configured with fill: 'stack'.
- 2.Apply a minute sub-pixel offset to an x-coordinate in the upper dataset (e.g., getDatasetMeta(1).data[2].x += 1e-9).
- 3.Observe the canvas render output for Dataset 1.
Expected
Dataset 1 (orange) stacked area fill should render continuously between Dataset 0 and Dataset 1 despite sub-pixel floating point precision differences in x coordinates.
Actual
Dataset 1 (orange) fill completely disappears, leaving only the line stroke and empty transparent background above Dataset 0.
Evidence
visualControl chart (delta = 0) at 1.0s correctly renders both blue and orange fills, while actual chart (delta = 1e-9 px applied) renders Dataset 1 line with missing orange fill.
consoleConsole warning reports: 'Bug chart pixel at 50%,35% (orange fill area): rgba(0,0,0,0) — expected orange tint (a>0), got a=0 (transparent = fill missing)'
Issue markdown (copy-paste ready)
### Summary In Chart.js 4.5.1, configuring datasets with `fill: 'stack'` causes the stacked dataset fill area to completely disappear if any data point's `x` coordinate has a minute sub-pixel offset (such as `1e-9 px`). ### Steps to Reproduce 1. Create a line chart with two stacked datasets using `fill: 'stack'` (at 1.0s). 2. Offset an x-coordinate slightly on the second dataset: `chart.getDatasetMeta(1).data[2].x += 1e-9` (at 1.0s). 3. Render the chart. ### Expected Behavior The orange fill between dataset 0 and dataset 1 should remain visible and stacked, tolerating sub-pixel precision variations (as shown in the control case on the left at 1.0s). ### Actual Behavior The orange fill area disappears entirely, rendering transparent pixels (`rgba(0,0,0,0)`) between the two dataset lines (at 1.0s, confirmed in console at 18.678s). *Recorded with SceneRecap.*
Your recordings could explain themselves too.
Free plan · silent recordings welcome · bug reports included.
Try SceneRecap free →