What problem does it solve?
Charts built for one query hardcode column names and display choices, so they cannot be reused across different queries. This Skill guides the creation of a single reusable visualization component (a Lightdash "viz") that declares its field mappings and config options, letting the host application supply data and letting viewers adjust settings without regenerating the chart.
Core Features & Use Cases
- Host-driven data contract: Uses the
useVizContext() hook from @lightdash/query-sdk to receive rows, field mappings, options, and resolved series colours instead of fetching data itself.
- Declaration contract: Emits a structured declaration of
fields, configOptions, and colorPalette so Lightdash builds the field-mapping UI and chart config panel automatically.
- Backend pivot and data-point actions: Handles backend-pivoted results via
pivotDetails and wires underlying-data and drill-down actions with per-row provenance.
- Use Case: Build one bar chart component that any Lightdash viewer can bind to their own query, recolour with the palette picker, and drill into — without touching the component code.
Quick Start
Ask the AI to build a reusable Lightdash viz component, for example a bar chart with a category dimension, a metric value, and configurable options like max bars and value labels.