Dataface Tasks

Add chart subtitle support

IDGRAPH_LIBRARY-ADD_CHART_SUBTITLE_SUPPORT
Statuscompleted
Priorityp2
Milestonem1-ft-analytics-analyst-pilot
Ownerdata-viz-designer-engineer
Completed byrj
Completed2026-03-26

Problem

Add first-class subtitle support for chart rendering across the compile and render pipeline. Extend chart schema/types to accept subtitle, carry it through compiled and resolved chart models, emit Vega-Lite subtitle blocks for standard charts, and decide whether KPI/table should support subtitles in the same task or as explicit follow-up. Keep this work separate from the M1 chart-batch texture and neutral-system decisions.

Context

  • Standard Vega-Lite-backed charts currently support only title in the Dataface pipeline; the shared spec helper writes spec["title"] = {"text": title} and does not expose subtitle support yet.
  • Dataface chart schema/types and render models currently carry title and description, but not a first-class subtitle.
  • Vega-Lite itself supports subtitle/title-block structure, so the missing support appears to be a Dataface omission rather than a hard Vega-Lite limitation.
  • Some required chart types for the chart-library milestone are not standard Vega-Lite output surfaces:
  • table is a custom SVG renderer
  • kpi is a custom SVG renderer
  • For those non-Vega-Lite charts, the preferred default should be: align their title/subtitle behavior to Vega-Lite's title-block defaults and semantics as closely as practical, rather than inventing a separate Dataface-only heading architecture.
  • This task should explicitly decide whether:
  • KPI/table subtitle support ships in the same implementation pass, or
  • standard Vega-Lite charts ship first and KPI/table follow immediately after as a scoped follow-up.

Possible Solutions

  • Recommended: Add a first-class subtitle field across the chart schema and rendering pipeline, emit native Vega-Lite subtitle structure for standard charts, and make non-Vega-Lite chart types mimic Vega-Lite title/subtitle behavior as closely as practical. Trade-offs: keeps the system internally coherent and avoids creating two incompatible title-block models, but requires a little custom renderer work for KPI/table.
  • Add subtitle support only for Vega-Lite-backed charts and leave KPI/table without subtitle support for now. Trade-offs: fastest initial delivery, but creates an avoidable inconsistency across the M1 chart batch.
  • Create a Dataface-specific heading abstraction that differs from Vega-Lite and map everything onto that. Trade-offs: potentially more flexible long-term, but too heavy for the current need and likely to create divergence from native Vega-Lite semantics.

Plan

  1. Extend input and compiled chart types to accept subtitle.
  2. Carry subtitle through chart intent / resolved chart render models.
  3. Update the standard Vega-Lite spec builder to emit subtitle-aware title blocks.
  4. Review Vega-Lite default subtitle styling/config seams and decide what should be exposed or inherited.
  5. For non-Vega-Lite charts (table, kpi), implement title/subtitle rendering that follows Vega-Lite title-block behavior as closely as practical.
  6. Add focused tests for schema acceptance, spec emission, and non-Vega-Lite title/subtitle rendering behavior.

Implementation Progress

  • 2026-03-24: Task created as a follow-on split out from the M1 chart-batch texture/system work.
  • 2026-03-24: Direction clarified in planning: subtitle support should not become a bespoke chart-library title architecture. Standard charts should use Vega-Lite-native subtitle support, and non-Vega-Lite charts should imitate Vega-Lite title/subtitle defaults as closely as practical.

QA Exploration

  • [x] QA exploration completed (or N/A for non-UI tasks)
  • N/A for this rendering-pipeline task; validation shipped through focused automated tests and the reviewed PR flow.

Review Feedback

  • [x] Review cleared
  • Covered by the landed review/PR flow for PR #831.