writing-vizro-yaml
Installation
SKILL.md
Vizro YAML & Component Reference
Critical Mistakes to Avoid
Each mistake below is expanded with code examples and fixes in yaml-reference.md.
@capture("graph")receives a DataFrame — usedata_framedirectly; never re-lookup viadata_manager[data_frame](causes blank charts).data_manageris not subscriptable — pre-process on raw DataFrame, then register.- Custom
_target_needs module prefix —_target_: custom_charts.my_chart, not_target_: my_chart. type: figurehas notitlefield — KPI titles go in_target_: kpi_cardargs.type: tablerequires_target_: dash_ag_grid.- Parameter targets — format:
"component_id.argument_name", not"component_id.figure". - Quote YAML special chars in column names —
column: "Version #"(unquoted#starts a comment). - Filter
targets:— omit when you want to apply it to all components on the page whose data source includes defined filtercolumn. - Grid must be rectangular — same component index must span same columns in every row.
- Column type consistency — filter column must have same dtype across all targeted datasets.