Repository navigation
Conversation
snario
force-pushed
the
feat/xychart-stacked
branch
from
November 9, 2026 23:18
36357d5 to
280c99b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multiple
barseries in an XY chart render side by side. Parts of a whole, such as orders by channel, read better as one bar per category whose segments add up to the total.This adds a
stackedoption underxyChart. Withstacked: true, all bar series of a chart draw as one bar per category:y-axisrange, the value axis fits the stack totals.showDataLabel, each stack shows its total, or both totals when it goes both ways.The option is configuration only, so the parser and diagram model stay identical to Mermaid 12.1.0, which ignores the key. mermaid-js/mermaid#7509 proposes a brace syntax for stacking, but it is not merged, so this PR adds no syntax.
--- config: xyChart: stacked: true showDataLabel: true --- xychart x-axis [Q1, Q2, Q3, Q4] bar "Online" [12, 15, 18, 22] bar "Store" [8, 7, 9, 10] bar "Partner" [3, 4, 6, 7]The XY chart page documents the option, and a changeset marks it as a minor release.
Validation:
cargo clippy,cargo test --workspace,pnpm check,pnpm check:types,vp test --project node(805 tests) andpnpm check:sizepass. Every existing XY chart vector renders byte-identical SVG. The browser screenshot suite was not run.