malloy-charts

Selects and annotates Malloy chart renderers for query result visualization.

Updated Jun 3, 2026
One-click install
npx skills add https://github.com/credibledata/credible-plugin --skill malloy-charts-credibledata
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: malloy-charts
Source: https://github.com/credibledata/credible-plugin/tree/main/codex/skills/malloy-charts
Command: npx skills add https://github.com/credibledata/credible-plugin --skill malloy-charts-credibledata

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing the right visualization for Malloy query results is error-prone: wrong chart tags, misplaced annotations, and invalid multi-measure charts silently produce broken or hidden renderings. This Skill provides a decision tree and full renderer reference so every Malloy view gets a valid, appropriate chart annotation. ## Core Features & Use Cases - Chart Selection Decision Tree: Maps data shapes (time series, categories, geo, KPIs) to the correct renderer such as # line_chart, # bar_chart, # shape_map, or # big_value. - Renderer Reference: Documents properties and constraints for charts, dashboards, pivots, transposes, and field formatting tags like # currency and # percent. - Theming & Advanced Patterns: Covers # theme.* annotations, sparklines in KPI cards, comparison deltas, and histogram binning via arithmetic. - Use Case: After running a revenue-by-region query, apply the decision tree to pick # bar_chart sorted by value, add # currency formatting, and nest it in a # dashboard alongside a KPI card. ## Quick Start Ask which chart type fits a Malloy query result and apply the recommended tag annotation to the view definition.

Frequently Asked Questions about malloy-charts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose the right chart type for a Malloy query?

Match the data shape to the renderer: one time column plus a measure uses # line_chart, one category plus a measure uses # bar_chart, aggregates only use # big_value, and two numeric columns use # scatter_chart. The decision tree in the reference maps each shape to a default choice.

How do I show multiple measures in one Malloy chart?

Charts render only the first aggregate by default. Use the y property with an array, such as # bar_chart { y=['revenue','cost'] }, to plot multiple measures as series on a single chart.

Why is my nested Malloy view not rendering in the chart?

A top-level chart tag renders only the outer query and silently hides nest views. To display nests, apply # dashboard to the outer query and put chart tags on each nested view definition, not on the nest line.

Does Malloy support pie charts or heatmaps?

Malloy has no native pie, donut, treemap, or heatmap renderer. Approximate them with # bar_chart sorted by value for pies, nested ordered tables for treemaps, and # pivot with color values for heatmaps.

Why does my Malloy chart fail with the word constructor in the query?

The word constructor is reserved in Vega-Lite, which Malloy uses for rendering. If it appears anywhere in the query, rendering fails, so avoid it in queries and as a dimension name in models.

How do I build a histogram in Malloy?

Malloy has no autobin function. Bin manually with arithmetic like floor(price / 20) * 20 in a group_by, choosing the bin width from the column's observed min, max, and percentiles, then render with # bar_chart.