Skip to content

Feature Concepts Guided by the Examples

The sample tracks form a concept map. A chart family is the starting point; the surrounding definition, source, axes, styling and interaction show how a production chart is assembled.

Concepts to Look for While Reading Examples

  • Marks and encodings: BarMark, LineMark, AreaMark, SectorMark, PointMark, RectangleMark, RuleMark, and composed marks describe what is drawn. Encodings such as X, Y, ForegroundStyle, Symbol, size, label, and series describe what the data means.
Composed mark example with blue monthly bars, an orange moving-average line, and pale pink quarterly markers.
Composed marks place totals, a moving average, and periodic markers in one plot so they can be read together.
Blue scatter points overlaid with a rising red linear trend line.
A linear trend overlay shows the overall direction while preserving the individual observations.
  • Chart type versus mark grammar: chart type chooses the default visual family, but marks still carry the semantic intent. This is why composed charts can combine bars, lines, points, rules, overlays, and annotations in one chart.
  • Axes and scales: domains, ticks, labels, time units, custom scale transformers, range padding, and binning decide how values are read. These concepts matter as much as the visual chart type.
  • Annotations and analysis: reference rules, trend lines, rich labels, overflow behavior, and accessibility descriptions turn a chart from a picture into an explanation.
  • Interaction and viewports: selection, brushing, angle selection, hover, drag, zoom, scrolling, paging, and visible domains create explorable charts without adding separate UI controls.
  • Live data and performance: keep mark identity stable, use SetValues for code-built Y-only updates or host.SetData(frame, shapeChanged: false) for compatible definition data, and use ring buffers, rolling windows, LOD and decimation for high-volume feeds.
  • Styling and compact UI: themes, gradients, mark effects, opacity, symbol choices, compact charts, indicators, and data labels tune information hierarchy for dashboards and repeated UI cells.
  • Accessibility and sonification: measurement formatting, per-mark labels/values, chart summaries, trend descriptions, and audio graphs help charts communicate beyond the visual rendering.

When a feature is unclear, find the closest sample in the numbered tracks, inspect its saved definition, then choose code, the Designer, Swift import or UI Toolkit for the production workflow.