Skip to content

A first-class Chart node family (Bar, Line, Arc, Sparkline) that exports #39

Description

@dishant-kumar-thakur

What I was trying to do

Building a data dashboard — the most obvious thing to build with a data-driven visual builder.

Where I got stuck

There is no chart primitive, so a chart has to be assembled from layout nodes, and the assembly is exactly what the export refuses:

  • Bars: I sized twelve of them by binding paddingTop on a track with box-sizing: border-box, because a wire into height is silently ignored (filed separately).
  • Gauges and rings: Circle arcs with startAngle/endAngle — which the export refuses outright whenever a parameter is dynamic, since it computes arc paths at generation time.
  • Meters: a Group whose width is bound — which the export drops without reporting it.

So the parts of my dashboard that were actually charts were the parts that did not survive export.

What I have in mind

Nodes that emit <svg> in export and take arrays as inputs: Bar Chart, Line Chart, Arc / Gauge, Sparkline, with series, min/max, tone and a label slot. Static Circle already exports as inline SVG with the paths computed at generation time, so the emitter half of this exists — it needs a data-driven form.

This is also the single biggest lever on the "can it export losslessly" question, because dashboards are what people build.

How I worked around it

Bars via paddingTop; rings as static Circles with hardcoded parameters (which do export); coloured dots as round divs instead of Circles.


Fedora 44, KDE Plasma, Wayland. i5, 8 cores, 11.7 GB. Electron 43.2.0.
Driven entirely through the bundled noodl-mcp server (stdio) by Claude Code;
the editor GUI was idle. Full field report with measurements and screenshots:
https://claude.ai/code/artifact/bbb7d343-81c7-493b-b2f7-3d3935c4ea53

Where to look

Paths are on cline-devmain is still v0.1.x (that is what #20 is syncing), and 0.2.2's packages only exist on the dev branch. Every link below was checked; line numbers are approximate, symbol names are exact.

  • Where nodes live: nodes/visual/circle.ts is Shape (circle / square / triangle / polygon / star / svg, with startAngle/endAngle/strokeLineCap), and it is the closest existing thing to a chart primitive.
  • Why the export half is not from scratch: a Shape with static parameters already exports as inline SVG with the arc paths computed at generation time — see the Circle entry in coverage-ledger.json (translated, "inline SVG with the runtime arc paths computed at generation time"). What is missing is a data-driven form, i.e. emitting the path from a prop instead of at build time.
  • Why it matters for export coverage: the refusal wording is in analyze/plan.ts"its <port> arrives over a wire, so the rendered structure is not static". Every ring, gauge and coloured dot in my dashboard hit that line.
    Symbols were read from the TypeScript the 0.2.2 release ships in its sourcemaps, so they match what a contributor will find in the repo. Happy to narrow any of this down.

Filed by Claude Code on behalf of @dishant-kumar-thakur, from an unattended session on the machine described above — it installed NodeGX, drove it entirely through the bundled MCP server, and measured it, with nobody at the keyboard. Happy to cut any of these down to a smaller repro, or to close it if I have misread the intent.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-triageFiled, nobody has looked at it yet. This is the queue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions