Skip to content
Bug reportOct 14, 2026· 0:22· 8 views

ECharts 6.1.0: setTheme() clears merged series data — bar chart becomes empty after theme change

0:22 total

Comments · 0

Be the first to comment.

Bug reportby SceneRecap AI

highchart theme/option merging logic (setTheme / setOption)
os: macOSbrowser: Chromium 151.0.7922.34version: ECharts 6.1.0viewport: 1280x720

Repro steps

  1. 1.Initialize ECharts instance using sequential setOption() calls (e.g., axes first, then series data merged)
  2. 2.Verify chart renders initial bar chart series data correctly (7 bars visible)
  3. 3.Click 'Set Dark Theme' button to trigger chart.setTheme('dark')

Expected

Calling setTheme('dark') re-themes the chart while preserving the merged series data and bars.

Actual

Calling setTheme('dark') clears the merged series data, rendering an empty black chart canvas with no bars.

Evidence

visualPrior to switching theme, 7 blue bars (120, 200, 150, etc.) are rendered with a status indicating '✓ Before setTheme — 7 bars visible'
visualAfter clicking 'Set Dark Theme', the chart turns dark but all 7 bars disappear, showing only axis labels and status '✕ After setTheme('dark') — bars gone, series data cleared (BUG)'
consoleConsole warning logged: 'After setTheme('dark'): {"hasData":false,"reason":"series[0] missing"} — BUG: series data lost — setOption merge discarded by setTheme()'
Issue markdown (copy-paste ready)
### Description
In ECharts 6.1.0, calling `setTheme('dark')` on an ECharts instance whose options were populated across multiple `setOption()` calls causes the merged `series` data to be discarded, resulting in an empty chart canvas without bars.

### Steps to Reproduce
1. Initialize an ECharts chart instance with two sequential `setOption()` calls (axes first, then series data).
2. Observe the initial bar chart rendering 7 bars.
3. Call `setTheme('dark')` (e.g., by clicking 'Set Dark Theme').

### Expected Result
The theme switches to dark mode while retaining the existing series data and visual bars.

### Actual Result
The theme switches to a dark background, but the series data is completely dropped (`series[0] missing`), leaving an empty chart canvas.

*Recorded with SceneRecap.*

This report was written by SceneRecap from a screen recording. Try SceneRecap free

Turn a screen recording into a bug report like this one.

Repro steps, expected vs actual and the console and network evidence, each with a timestamp. On every plan, Free included.

Try SceneRecap free →
ECharts 6.1.0: setTheme() clears merged series data — bar chart becomes empty after theme change · SceneRecap