malloydata/publisher/malloy-charts
Claude Code and agent skill by malloydata/publisher
- community
Checking that the SKILL.md file is still in the repository.
Read before choosing a chart or adding a chart annotation. Chart types, tag syntax and scale rules, KPI cards, dashboards, sparklines, and the renderer mistakes that fail silently.
Install
npx vskill@latest install malloydata/publisher/malloy-chartsSKILL.md
Chart Selection for Malloy
Malloy uses Vega-Lite under the hood.#tags control visualization. Callsearch_malloy_docswith topic "rendering" for the full tag reference (or see https://docs.malloydata.dev/documentation/visualizations/overview).
This file is about the Malloy renderer's `#` tags. It applies when the view itself is rendered - a tile or cell in a report (either layout), an explore result. It does not apply to an app that draws its own charts with a vendored chart library: there the tag vocabulary is irrelevant and the full form vocabulary is available, so the approximations below (a funnel as a bar chart, a treemap as a nested table) are the wrong advice. Design to whichever vocabulary the surface actually uses.
Tool names are written bare here -get_context,execute_query,search_malloy_docs. The exact prefixed name depends on the host surface; match each against the tools you actually have.
Decision Tree: Which Chart?
| Data Shape | Default Choice | |
|---|---|---|
| Aggregates only (no group_by) | # big_value | |
| 1 time column + 1 measure | # line_chart | |
| 1 category + 1 measure | # bar_chart | |
| 2 numeric columns | # scatter_chart | |
| Geographic (US states) + 1 measure | # shape_map | |
| Route data (lat/lon pairs) | # segment_map | |
| Multiple perspectives | # dashboard with nest: | |
| Nested query to pivot | # pivot | |
| Filtered aggregates side-by-side | # flatten | |
| Detailed rows | Default table (no annotation) |
| Goal | Renderer | |
|---|---|---|
| Compare categories | # bar_chart (sort by value, limit ~15) | |
| Show composition | # bar_chart.stack | |
| Trend over time | # line_chart | |
| Highlight KPIs | # big_value with # label | |
| Correlation | # scatter_chart | |
| Compare dimensions | # dashboard (nest chart views) | |
| Before/after | # transpose or # pivot | |
| Multiple metrics per category | Default table, # flatten, or y=['a','b'] |
Constraints:
- ONE aggregate per chart view (charts render only the first; use
y=['a','b']for multi-measure) - No fixed scale on measure definitions: use
# currencynot# currency=usd0m. The same measure renders at many granularities, andusd0mturns $500 into$0.0M. Add a scale only in a view, after confirming the value range with a query. - One tag per line, each directly above the field it styles. Two
#tags on one line do not work. - Alias joined fields in
group_bybeforeorder_by - Define measures in source, not in views
Chart Types
# bar_chart
Data shape: group_by = x-axis, aggregate = y-axis, optional 2nd group_by = series.
Key properties: .stack, .size (spark/xs/sm/md/lg/xl/2xl), .x, .x.limit, .y (supports y=['a','b']), .series, .series.limit (default 20), .title, .subtitle, .x.independent, .y.independent
Field role tags: # x, # y, # series on individual fields to assign roles explicitly.
# line_chart
Data shape: group_by (temporal/numeric) = x-axis, aggregate = y-axis, optional 2nd group_by = series.
Key properties: .zero_baseline, .interpolate (e.g., step), .size, .y (supports y=['a','b']), .series.limit (default 12), .title, .subtitle
# scatter_chart
Data shape: Fields by position: x, y, color, size (bubble), shape.
# shape_map
Choropleth. US states only. Fields: state name, value.
# segment_map
Route map. US only. Fields: start_lat, start_lon, end_lat, end_lon, color.
Layout Types
# big_value
KPI cards. Aggregates only, no group_by.
Properties: .size, .sparkline=<nested_view_name>, .comparison_field, .comparison_label, .down_is_good
Put # label on every measure. Without it the card shows the raw field name, which is often unclear.
# dashboard
Card-based multi-tile layout. Apply to a view whose body is a nested query; the view's own fields lay out automatically:
group_bydimensions -> a row header (repeats once per row; omit for a single block)aggregatemeasures -> KPI cards, one per measure- each
nest:-> a tile, rendered by the tag above it (# tabledefault, or# bar_chart/# line_chart/# big_value)
Two modes. Flex (default): tiles flow and wrap; # break forces a new row. Columns: # dashboard { columns=N } lays tiles into N equal columns, # colspan=n widens a tile (the old # span is gone), # break starts a new row, overflow wraps.
Tags: # dashboard { columns=N } (columns mode), { gap=PX } (tile spacing, default 16; never a mode), { table.max_height=PX|none } (cap table tiles). On a measure or nest: # colspan=N (columns mode only), # break (both modes), # subtitle="..." (tile), # borderless (drop card chrome), # label="..." (card title).
For rich KPI cards (sparklines, comparison deltas, several metrics on one card) nest a # big_value view instead of relying on the dashboard's own measures:
Rules: # dashboard needs a nested-query view (no effect on a scalar). # colspan works only in columns mode and is ignored (warns) in flex. columns is any positive integer; a # colspan over the column count clamps to a full row. Style tiles via the instance theme, or theme the views inside with # theme.* (see Theming below).
# pivot
Pivot nested results into columns. Max 30 pivot columns.
# transpose
Swap rows/columns. Good for period comparisons.
# list / # list_detail
List renders as comma-separated values. List_detail shows value (detail) pairs.
# flatten
Collapse nested record into parent table as columns. Use for side-by-side filtered aggregates:
# table
Default (implicit). Use explicitly for .size=fill property.
Field Formatting Tags
| Tag | Use For | Shorthand | |
|---|---|---|---|
# number | Numeric formatting | =auto (K/M/B), =id (no commas), =1k, =1m | |
# percent | Percentages | (none needed) | |
# currency | Money | =usd2m (USD, 2 decimals, millions); scale only in views | |
# duration | Time durations | =seconds, =minutes, =hours, =days | |
# data_volume | Storage sizes | =bytes, =kb, =mb, =gb | |
# link | Hyperlinks | .url_template="https://example.com/$$" | |
# image | Inline images | .height=40px, .width=100px |
# image and # link are fine in a model file. A document held as text (one with a model-level ## artifact tag, compiled at scope append) is refused if it writes either; define the field in the model file and check that edit at scope file.
Currency codes: usd ($), eur, gbp. Scale: K/M/B/T/Q or auto. Number suffix styles: word ("42.5 million"), letter ("42.5M"), scientific.
Utility Tags
| Tag | Purpose | |
|---|---|---|
# hidden | Hide from output (still usable for sorting/references) | |
# label="..." | Override display name | |
# description="..." | Tooltip text | |
# tooltip | Include nested view in chart tooltip | |
# break | Force new dashboard row | |
# column { width=sm } | Table column width |
Model-Level Defaults
Theming
Publisher styles charts and tables from one structured theme. The instance sets it (in publisher.config.json's theme block or the Settings, then Theme editor); a model overrides it per result with # theme.* annotations, or model-wide with ## theme.*. Per-chart annotations use the same nested palette.* / font.* vocabulary as the config, not flat key names, and they win over the instance theme for the keys they set. The forms:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/malloy-charts/SKILL.md
Popularity
- Repository stars
- 95
- Repository forks
- 23
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/malloydata/publisher/malloy-charts)