Techniques
Keyed record fields and compact declarations
Records addressed by stable keys (refresh-safe), and the one-line view-header form that expands to a canonical declaration.
chart.basic@1New DDN source
Why use it?
Keys make data refreshes order-independent; the compact header makes small views writable without boilerplate.
When it helps
Data-bound views that refresh, and any view small enough to say in one line.
How to read it
- The chart binds records by key — reordered or refreshed data lands on the same bars.
- The variant shows the compact form: one header line desugars to the same data + projection the verbose form declares.
What you need
- The records with their keys
- The projection binding
- The compact header form for small views
Things to check
- Do not rely on record order once keys exist — keys are the contract.
- The compact form expands to canonical declarations; if you need more, write the verbose form.
Scope of this diagram
Keyed binding and header desugaring as specified; no schema inference beyond the declared records.
Work with the converted example
- Open the viewer and select
metrics_chart. Inspect the rendered view and its source. - Open the designer. Keep the selected profile and inspect its legal palette and property controls.
- Change one displayed title or an appropriate data value. Apply the edit and check the resulting diagram.
- Run the verifier and review its diagnostics before moving complete content into review.
- Download your edited DDN source to retain the change.
The example uses the indentation-based ddn-next-1 dialect. The language guide explains reusable definitions, dotted data rows and explicit property blocks.