Bug reportSep 30, 2026· 0:27· 0 views
ECharts: stacked bars overlap instead of stacking when time-axis data is not fully synchronised
0:27 total
Comments · 0
Be the first to comment.
Bug report— by SceneRecap AI
mediumchart/bar/stack
os: macOSbrowser: Chromium 151.0.7922.34timezone: Europe/Berlinviewport: 1280x720
Repro steps
- 1.Open Apache ECharts editor with a time xAxis ('type: time') and value yAxis.
- 2.Define two stacked bar series with the same stack name ('foo').
- 3.Provide asynchronous or different timestamp counts in each series: Series 1 with 1 point at '2024-01-01T01:00:00Z' (value 2), and Series 2 with 3 points at 00:00:00, 01:00:00, and 02:00:00 (values 1, 1, 1).
- 4.Render the chart and inspect the rendered bar positions.
Expected
Stacked bars on a time axis should align and stack based on matching timestamp values on the x-axis, so the bar at 01:00:00 stacks on top of the 01:00:00 bar of the underlying series.
Actual
ECharts stacks values across series based on raw array index rather than matching timestamp coordinates, resulting in floating bars stacked at incorrect x/y offsets (e.g. index 0 of series 1 stacked above index 0 of series 2 regardless of timestamp mismatch).
Evidence
visualThe green bar corresponding to series 1 (index 0, timestamp 01:00:00, value 2) is rendered floating between y=2 and y=3 at the far left (around 00:15–00:30) above the index 0 position instead of stacking above the bar at 01:00:00.
visualHovering over the chart at 01:00:00 shows the axis tooltip reporting values 2 and 1, but the bars rendered at 01:00:00 show a blue bar from 1 to 2 and green bar from 0 to 1.
visualHovering at 00:00:00 shows a tooltip with a single value 1 while the floating green bar sits disconnected above.
Issue markdown (copy-paste ready)
### Description
When configuring stacked bar series (`stack: 'foo'`) on an `xAxis` with `type: 'time'`, ECharts computes stacking baselines using the array index rather than matching time coordinates. If two series have differing data timestamps or missing points, bars stack on top of mismatched time entries, producing floating and misaligned bars.
### Repro Steps
1. Open Apache ECharts editor.
2. Configure an option object with `xAxis: { type: 'time' }` and `yAxis: { type: 'value' }`.
3. Add two bar series with matching `stack: 'foo'`:
- Series 1: `data: [[new Date('2024-01-01T01:00:00Z'), 2]]`
- Series 2: `data: [[new Date('2024-01-01T00:00:00Z'), 1], [new Date('2024-01-01T01:00:00Z'), 1], [new Date('2024-01-01T02:00:00Z'), 1]]`
4. Render the chart.
### Expected Behavior
Series data sharing the same `stack` name on a continuous/time axis should match points by their coordinate value before computing the stacking offset.
### Actual Behavior
Series 1 item 0 (timestamp 01:00:00) stacks on Series 2 item 0 (timestamp 00:00:00), leading to a floating bar at y=2..3 at an incorrect horizontal position.
*Recorded with SceneRecap.*Your recordings could explain themselves too.
Free plan · silent recordings welcome · bug reports included.
Try SceneRecap free →