Use this skill when choosing chart types, applying Plotly Express conventions, configuring colors, building KPI cards, or adding tables (AG Grid) to Vizro dashboards. Activate when the user asks which chart fits their data, needs custom chart functions, wants to set colors or palettes, is creating KPI metric cards, or needs a tabular detail view.
89
88%
Does it follow best practices?
Impact
86%
1.53xAverage score across 3 eval scenarios
Passed
No known issues
| Data question | Chart |
|---|---|
| Compare categories | Bar (horizontal preferred) |
| Trend over time | Line (12+ points) |
| Part-to-whole (simple) | Pie/donut (2–5 slices only) |
| Part-to-whole (complex) | Stacked bar |
| Distribution | Histogram or box |
| Correlation | Scatter |
Never use: 3D charts, pie with 6+ slices, dual Y-axis, bar charts not starting at zero.
app.py or custom chart functions.marker_color, hex codes, color_discrete_map, or color_discrete_sequence. This applies even for categories with apparent semantic meaning. Only override when the user explicitly asks.from vizro.themes import palettes, colors for cell styling.@capture("graph"))Use when: aggregation/sorting needed, update_layout()/update_traces() calls, reference lines, parameter-driven logic, dual-axis, multi-trace go.Figure(), shared legend control.
In practice, most bar and line charts need @capture("graph") functions that aggregate data inside. Inline px.bar(data_frame="raw", x="region", y="revenue") on detail-level data stacks individual rows as separate rectangles instead of summing — producing visually broken charts.
kpi_card / kpi_card_reference from vizro.figures in Figure model._target_: kpi_card → title:), not on the component.vm.AgGrid with figure=dash_ag_grid(data_frame=...) from vizro.tables. AG Grid is the only table component you should write.vm.Table / Dash DataTable. Never fake a table with Plotly (heatmap-with-text, px.imshow annotated as a table, scatter-with-text). Even small tables go in AG Grid; KPI cards or a horizontal bar chart are the only acceptable lighter alternatives.@capture("ag_grid") with data_frame as the exact DataFrame argument name (not df, not data).@capture("ag_grid") for runtime-parameterized grids) and the Dash AG Grid / JS AG Grid knowledge-mapping notes.Load chart-best-practices.md when you need: extended chart type decision tree, Plotly Express formatting conventions (100% stacked bar, axis/legend cleanup), palette/color names and use cases, accessibility rules, or detailed @capture("graph") guidance.
e1cf317
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.