Skip to content
Bug reportDec 1, 2026· 0:32· 15 views

ECharts 6.1.0: pie chart with two equal large values (1e308) shows 100% and 0% instead of 50% each

0:32 total

Comments · 0

Be the first to comment.

Bug reportby SceneRecap AI

lowPie series percentage and angle calculation. The sum of the data values overflows to Infinity, so value / sum becomes 0. A possible fix is to normalize values, for example by dividing by the max value, before summing.
os: macOSdpr: 1locale: en-USbrowser: Chromium 151.0.7922.34library: ECharts 6.1.0 (cdn.jsdelivr.net)timezone: Europe/Berlinviewport: 1280x720

Repro steps

  1. 1.Load ECharts 6.1.0 from cdn.jsdelivr.net on a test page.
  2. 2.Render a control pie chart with data [1, 1].
  3. 3.Render a second pie chart with data [1e308, 1e308] and percentage labels.
  4. 4.Compare the percentage labels and slices of both charts.

Expected

Two equal values should each show 50%. The pie should draw two equal half slices, as the control chart with data [1, 1] does.

Actual

The chart with data [1e308, 1e308] labels A: 100% and B: 0%. No pie slices are visible, only the label lines.

Evidence

visualControl chart with data [1, 1] works correctly. It shows A: 50% and B: 50% with two half slices. Its badge reads '50%/50% (correct)'.
visualBug chart with data [1e308, 1e308] shows labels A: 100% and B: 0%. Its badge reads '100%/0% (WRONG)'.
visualBug chart draws no visible pie area. Only the leader lines and labels near the top of the chart are shown.
visualThe control pie appears briefly redrawn or animated. It returns to normal by 11.0s. The bug chart is unchanged.
visualAn overlay reads 'Expected: A: 50%, B: 50%' and 'Actual: A: 100%, B: 0%'. It explains '1e308 + 1e308 = Infinity' and '1e308 / Infinity = 0 → wrong %'.
consoleWarning that the echarts@6.1.0 script from cdn.jsdelivr.net is invoked via document.write. This is a loading warning and does not seem related to the bug.
Issue markdown (copy-paste ready)
## Summary
In ECharts 6.1.0, a pie chart with two equal large values `[1e308, 1e308]` labels the slices A: 100% and B: 0%, and no slices are drawn. The expected result is 50% each.

## Environment
- ECharts 6.1.0 (cdn.jsdelivr.net)
- Chromium 151.0.7922.34, macOS
- Viewport 1280x720, dpr 1

## Steps to reproduce
1. Load ECharts 6.1.0 from cdn.jsdelivr.net (0s).
2. Render a pie chart with data `[1, 1]` as a control (1s).
3. Render a pie chart with data `[1e308, 1e308]` with percentage labels (1s).
4. Compare the labels and slices (1s).

## Expected
A: 50%, B: 50%, with two equal half slices.

## Actual
A: 100%, B: 0%. No pie area is rendered, only the label lines.

## Evidence
- 1s: The control chart with data `[1, 1]` works. It shows A: 50% and B: 50% and its badge reads '50%/50% (correct)'.
- 1s: The bug chart with data `[1e308, 1e308]` shows A: 100% and B: 0%. Its badge reads '100%/0% (WRONG)'. No slices are visible.
- 9s: The control pie briefly redraws and returns to normal by 11s. The bug chart does not change.
- 19s: An overlay explains `1e308 + 1e308 = Infinity` and `1e308 / Infinity = 0 → wrong %`.
- 0s (console): A document.write script loading warning. It does not seem related.

## Suggested area
Pie series percentage and angle computation. The sum overflows to Infinity. Normalizing values before summing, for example by dividing by the max value, would avoid the overflow.

*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: pie chart with two equal large values (1e308) shows 100% and 0% instead of 50% each · SceneRecap