Manual
The document
OverviewGrammarDocument headerSyntax cheatsheet Scene Step
Content
Text blocks
Paragraph Heading 1 Heading 2 Heading 3 Heading 4 List
Maths
Equation Maths
Tables & images
Table Image
Formatting
Bold Italics Inline Code Highlight
Text colours
Links & references
Link Footnote Icon Internote Reference
ValueWhere inline content works
Narrative only
Note Definition Example Task Divider
Graph pane
Graph
Curves & areas
Curve Integral
Data marks
Scatter Histogram
Fits
Fit Residuals
Surfaces
Contour Heatmap
Marks
Line Segment Vector Point Polygon Text
Shapes
Circle Square Rectangle Triangle Star Diamond Hexagon
Axis furniture
Axis label Axis Brace
Expressions
Code pane
Code Lines
Animation & interaction
Cues that wrap content
Cue Draw cue Trace cue Highlight cue Spotlight cue Type cue
Cues on a value
Value cue Zoom cue
Anchors & timing Parameter
Advanced features
Data Let Define Preset Include If For Ignore
Reference
All constructs A–ZAttribute types
Concepts
IdentifiersBody & detailDerived attributes
Guidance
The narrative contractWhat earns a place on the canvasParameter or cueHonest numbersCode demonstrates, never computesAuthor-attached data only
?
  1. Reference
  2. Concepts
  3. Derived attributes

Derived attributes

Read-only values a construct computes while it renders — what publishes them, and why they cannot be substituted.

#What a derived attribute is

Some constructs compute something as they render — a fit's slope, an integral's area, the value a reader has dragged a parameter to. Those results are published as derived attributes: read-only, recomputed every frame, and never written by the author. They are listed in their own section on the reference page of any construct that has them.

#Reading one

By member access on the construct's id. In attribute position the binding is written directly; in prose it is wrapped in !value, because a reference written bare in a body compiles as literal text.

text(x: 0; y: 4; label: slope = #f.slope)     in an attribute — a binding
The fitted slope is !value:#f.slope(digits: 2). in prose — a micronode

What publishes them today:

  • fit — slope, intercept, r2. The slope is the fitted polynomial's derivative at zero: exact, and live under whichever degree the reader has chosen.
  • curve — max and min over the plotted domain.
  • integral — value, the computed area.
  • parameter — value, wherever the reader has left the slider.
  • contour and heatmap — min and max over the visible window.

#Why they refuse substitution

{{#fit.slope}} is a compile error, and deliberately so. A substitution is a snapshot spliced into the source before parsing; a derived value is whatever the render currently computes. Freezing one into the document would let the prose assert a number the picture beside it disagrees with — which is the exact failure this machinery exists to prevent.

The same rule covers animated attributes and reader-set parameters. If a value can change after compilation, it must be reached by a binding. Identifiers covers the distinction in full, and Honest numbers is the authoring rule that follows from it.

#What publishes them

The construct itself, from inside the renderer, once per frame. Nothing an author writes can add a derived attribute to a construct that does not declare one, and nothing can set one — an attempt to assign #f.slope is an error, not a silent override. Existence is still proven at compile time: a reference to a derived name the construct does not publish fails before anything renders.

On this page
What a derived attribute isReading oneWhy they refuse substitutionWhat publishes them
PrivacyTermsContact Support
Derived attributes · Internote