Skip to content

Mental model

ChartBuddy embed has three layers:

  1. Insight — the public instance you create (new Insight(target, options))
  2. Chart — the engine drawing SVG into the target (insight.chart)
  3. chartData (cd) — the serializable config + data object
Insight  →  mounts & chrome (view/edit, PNG, export)
   └─ chart  →  renders SVG
         └─ cd / chartData  →  type, seriesData, axes, annotations, …

Axes are roles, not x/y

Axes are modeled as roles — domain (categories) and range (values) — mapped to positions (top / bottom / left / right). orientation decides which role sits where, so a horizontal bar chart is the same chartData with orientation: 'horizontal'. See Orientation.

Modes

  • View — deliverable chart + hover ball
  • Edit — full formatting UI inside the mount

Developer & LLM documentation · Not the end-user Help Center · Help Center