Appearance
Mental model
ChartBuddy embed has three layers:
Insight— the public instance you create (new Insight(target, options))- Chart — the engine drawing SVG into the target (
insight.chart) 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