feat: charts and shape primitives + XML parser (full design, 5 phases)#11
Merged
Conversation
Exclude 'data' from generic list-attribute expansion so top-level qr/barcode data attributes stay scalar; chart-series data is expanded by its dedicated converter.
…pped ComputePlotArea now accepts a topGutter parameter reserved at the top of the plot regardless of whether a title is present. The topmost y-axis tick label is drawn centered at plot.Top, so with no top headroom its upper half was clipped against the chart box top edge; the tallest bar/line point hit the same edge. Axis-based renderers (bars, line/area, scatter/bubble) now pass topGutter = theme.LabelSize * 0.6f to clear half the top tick label. Regenerated affected chart goldens and their visual-docs mirror copies.
Owner
Author
Follow-up refactor: decouple FlexRender.Xml from FlexRender.YamlPer review feedback ("why does the XML parser depend on YAML? they should be independent"), What changed (6 commits,
Result: both format packages share one engine in Core and neither depends on the other. YamlDotNet stays confined to Verification: full suite green on net10.0 — 3311 passed, 0 failed (3060 main + 164 ImageSharp + 87 CLI). Build clean (0 errors). XML produces the identical |
This was referenced Jun 14, 2026
Closed
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.
Implements the complete charts-and-shapes design — all 5 phases — so LLM agents can generate polished graphics and charts from declarative templates without hand-written SVG.
Design spec:
docs/superpowers/specs/2026-06-12-charts-and-shapes-design.md. Each phase has its own TDD plan underdocs/superpowers/plans/.Phase 1 — Shape primitives
rect/circle/ellipse(fill/gradient/stroke/opacity, rect radius, circlesizeshorthand).{gradient: linear|radial, colors, angle}) → reuses the existing CSS gradient renderer.drawelement — free-form absolute-coordinate shapes: line, polyline, rect, circle, path (M/L/Q/C/Z, hand-written AOT-safe tokenizer, no regex).ResourceLimits.MaxShapesPerDraw.Phase 2 — Charts base
chartelement: bar (vertical/horizontal/stacked), line/area (smooth curves, point markers), pie/donut (slice % / value labels).light/dark/minimal) + palettes (ocean/sunset/forest/mono/vividor explicit colors) — beautiful by default, zero styling decisions required.data: "{{ sales }}").Phase 3 — Charts extension
[x,y]/[x,y,r]tuple data, X+Y axis scaling, radius-normalized bubbles), gauge (270° dial), progress (ring), sparkline (chrome-free inline line).Phase 4 — Charts advanced
Phase 5 — FlexRender.Xml
XmlTemplateParsertranslates XML → the sharedParseDocumentRoot, reusing all element/chart/shape parsing,KnownPropertiesvalidation + typo suggestions, and resource limits.RenderXmlextension. Docs:docs/wiki/Xml-Syntax.md.Quality
ArgumentNullException.ThrowIfNull, switch-based dispatch, XML docs on public API.<else-if>rejected with clear errors.MaxShapesPerDraw,MaxSeriesPerChart,MaxDataPointsPerSeries), never weakened.MaxDataPointsPerSeries), now fixed.Docs
llms.txt,llms-full.txt, wikiElement-Reference/Visual-Reference/Xml-Syntax(with rendered examples underexamples/visual-docs/), Playground JSON schema + autocomplete,AGENTS.mdpackage structure.Follow-ups (tracked in the phase plans)
flexrender/skills/template/SKILL.mdinRoboNET/FlexRender-Marketplace.MaxPathCommandsas a configurable limit.🤖 Generated with Claude Code