Bug reportNov 24, 2026· 0:47· 10 views
mermaid xyChart: multiple bar series drawn at the same x positions (overlapping)
0:47 total
Comments · 0
Be the first to comment.
Bug reportby SceneRecap AI
mediumMermaid xychart renderer: bar plot x positioning and bar width when the chart has more than one bar series.
os: macOSapp: Mermaid Live Editordpr: 1url: /editlocale: en-USbrowser: Chromium 151.0.7922.34timezone: Europe/Berlinviewport: 1280x720
Repro steps
- 1.Open Mermaid Live Editor at /edit.
- 2.Click in the Code editor.
- 3.Press Cmd+a to select all code.
- 4.Press Cmd+v to paste an xychart titled 'Test XY Chart' with two bar series and one line series (Jan to Dec, Months x axis, Values y axis).
- 5.Click Reset view to center the chart.
- 6.Observe the bars for each month.
Expected
Each month shows the two bar series next to each other (grouped), so both values can be read on their own.
Actual
Both bar series render at the same x position for each month. The dark bars (for example 2 in Jan, 6 in Nov) are painted on top of the light bars (10 in Jan, 18 in Nov). One series hides part of the other.
Evidence
visualAfter pasting the two-bar chart, 'Test XY Chart' renders with dark bars drawn inside the light bars at the same x positions.
visualAfter Reset view, the full Jan to Dec chart is centered. Every month shows the dark bar overlapping the light bar, for example Jan dark about 2 over light 10 and Nov dark about 6 over light 18.
visualControl: a pasted chart titled 'Single bar + line (control)' with one bar series and a gray line renders correctly. It has one light bar per month and no overlap.
visualControl still renders correctly after Reset view.
visualPasting the two-bar 'Test XY Chart' again reproduces the overlapping bars.
visualThe overlap is still present on the re-pasted two-bar chart.
Issue markdown (copy-paste ready)
## Summary In an xychart with two `bar` series, both series are drawn at the same x position for each category. The bars overlap instead of being grouped side by side. ## Environment - Browser: Chromium 151.0.7922.34 - OS: macOS - Viewport: 1280x720, dpr 1 - App: Mermaid Live Editor (`/edit`) ## Steps to reproduce 1. Open Mermaid Live Editor at `/edit` (0s). 2. Click in the Code editor (4.6s), press Cmd+a (5.1s), then Cmd+v (5.4s) to paste an xychart titled "Test XY Chart". It has two bar series and one line series over Jan to Dec. 3. Click **Reset view** (9.8s). 4. Look at the bars for each month (11s). ## Expected The two bar series sit side by side within each month, so each value is readable. ## Actual Both bar series share the same x position. The dark series (for example 2 in Jan, 6 in Nov) is painted over the light series (10 in Jan, 18 in Nov). This is first visible at 7s and is clear after Reset view at 11s. ## Control (works) A chart titled "Single bar + line (control)" with one bar series plus a line renders correctly. It shows one light bar per month and no overlap (23s, still correct after Reset view at 27s). ## Reproducibility Pasting the two-bar chart again at 36.6s reproduces the overlap (37s, 39s). ## Evidence - 7s: two-bar chart renders with overlapping bars. - 11s: full chart centered after Reset view, overlap on every month. - 23s: control single-bar chart renders correctly. - 37s and 39s: overlap reproduced after re-paste. ## Suggested area xychart bar plot rendering: x offset and width per series when there are multiple bar series. *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 →