Chart Image
Generate publication-quality chart images from data. Supports line, bar, area, point, histogram, candlestick, pie/donut, heatmap, multi-series, and stacked c...
Generate publication-quality chart images from data. Supports line, bar, area, point, histogram, candlestick, pie/donut, heatmap, multi-series, and stacked c...
Real data. Real impact.
Emerging
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Generate PNG chart images from data using Vega-Lite. Perfect for headless server environments.
Built for Fly.io / VPS / Docker deployments:
canvas which requires build tools)cd /data/clawd/skills/chart-image/scripts && npm install
node /data/clawd/skills/chart-image/scripts/chart.mjs \ --type line \ --data '[{"x":"10:00","y":25},{"x":"10:30","y":27},{"x":"11:00","y":31}]' \ --title "Price Over Time" \ --output chart.png
node chart.mjs --type line --data '[{"x":"A","y":10},{"x":"B","y":15}]' --output line.png
Useful when you want a fixed numeric or temporal window without editing Vega-Lite by hand:
node chart.mjs --type line \ --data '[{"minute":0,"value":12},{"minute":1,"value":18},{"minute":2,"value":14},{"minute":3,"value":20}]' \ --x-field minute --y-field value --x-type quantitative \ --x-domain 0,2 --title "First 3 Minutes" \ --output x-domain.png
node chart.mjs --type bar --data '[{"x":"A","y":10},{"x":"B","y":15}]' --output bar.png
node chart.mjs --type area --data '[{"x":"A","y":10},{"x":"B","y":15}]' --output area.png
Use this for numeric distributions instead of pre-binned bar charts:
node chart.mjs --type histogram \ --data '[{"value":12},{"value":18},{"value":19},{"value":24},{"value":31}]' \ --x-field value --x-title "Response Time (ms)" --y-title "Count" \ --bins 8 --tick-min-step-y 1 --x-label-angle -30 \ --output hist.png
# Pie node chart.mjs --type pie --data '[{"category":"A","value":30},{"category":"B","value":70}]' \ --category-field category --y-field value --output pie.pngDonut (with hole)
node chart.mjs --type donut --data '[{"category":"A","value":30},{"category":"B","value":70}]'
--category-field category --y-field value --output donut.png
node chart.mjs --type candlestick \ --data '[{"x":"Mon","open":100,"high":110,"low":95,"close":105}]' \ --open-field open --high-field high --low-field low --close-field close \ --title "Stock Price" --output candle.png
node chart.mjs --type heatmap \ --data '[{"x":"Mon","y":"Week1","value":5},{"x":"Tue","y":"Week1","value":8}]' \ --color-value-field value --color-scheme viridis \ --y-label-overlap greedy \ --title "Activity Heatmap" --output heatmap.png
Compare multiple trends on one chart:
node chart.mjs --type line --series-field "market" \ --data '[{"x":"Jan","y":10,"market":"A"},{"x":"Jan","y":15,"market":"B"}]' \ --title "Comparison" --output multi.png
node chart.mjs --type bar --stacked --color-field "category" \ --data '[{"x":"Mon","y":10,"category":"Work"},{"x":"Mon","y":5,"category":"Personal"}]' \ --title "Hours by Category" --output stacked.png
Price line with volume bars:
node chart.mjs --type line --volume-field volume \ --data '[{"x":"10:00","y":100,"volume":5000},{"x":"11:00","y":105,"volume":3000}]' \ --title "Price + Volume" --output volume.png
node chart.mjs --sparkline --data '[{"x":"1","y":10},{"x":"2","y":15}]' --output spark.png
Sparklines are 80x20 by default, transparent, no axes.
| Option | Description | Default |
|---|---|---|
| Chart type: line, bar, area, point, histogram, pie, donut, candlestick, heatmap | line |
| JSON array of data points | - |
| Output file path | chart.png |
| Chart title | - |
| Width in pixels | 600 |
| Height in pixels | 300 |
| Option | Description | Default |
|---|---|---|
| Field name for X axis | x |
| Field name for Y axis | y |
| X axis label | field name |
| Y axis label | field name |
| X axis type: ordinal, temporal, quantitative | ordinal |
| Clamp/zoom the X scale with bounds for quantitative or temporal charts | auto |
| Temporal X axis label format (d3-time-format, e.g. , ) | auto |
| X axis order: ascending, descending, or none (preserve input order) | auto |
| Explicit series/category order for multi-series and stacked legends (e.g. ) | data order |
| Max pixel width for X axis labels before Vega truncates them | auto |
| Max pixel width for Y axis labels before Vega truncates them | auto |
| Target X-axis tick count for dense or sparse charts | auto |
| Target primary/left Y-axis tick count for dense or sparse charts | auto |
| Histogram bin count ( only) | Vega auto |
| Minimum step between ticks on quantitative axes (great for counts / whole-number charts) | Vega auto |
| Minimum step between ticks on quantitative X axes only | Vega auto |
| Minimum step between ticks on quantitative Y axes only | Vega auto |
| Rotate X-axis labels (for dense categories / timestamps) | -45 |
| Rotate Y-axis labels (useful for horizontal bars / heatmaps) | 0 / Vega default |
| Force Vega X-axis overlap handling (, , , ) for crowded labels | Vega auto |
| Force Vega Y-axis overlap handling (, , , ) for crowded labels | Vega auto |
| Target secondary/right Y-axis tick count for dual-axis and volume charts | auto |
| Y scale as "min,max" | auto |
| Add vertical padding as a fraction of range (e.g. = 10%) | 0 |
| Option | Description | Default |
|---|---|---|
| Line/bar color | #e63946 |
| Dark mode theme | false |
| Output SVG instead of PNG | false |
| CSS font-family string for chart text/legend/title theming | Helvetica, Arial, sans-serif |
| Title alignment: , , | start |
| Title font size override in px | auto |
| Subtitle font size override in px | auto |
| Title font weight override (, , -) | auto |
| Subtitle font weight override (, , -) | auto |
| Title text color override | theme text |
| Subtitle text color override | theme grid |
| Dash pattern for gridlines (for example ) | solid |
Font examples:
"Inter, Helvetica, Arial, sans-serif", "Georgia, serif", "JetBrains Mono, Consolas, monospace"
| --no-points | Hide point markers on line charts | false |
| --line-width N | Set line thickness in pixels for line charts | 2 |
| --point-size N | Set point marker size for line/point charts | 60 |
| --bar-radius N | Round bar corners in pixels for bar-based charts | 0 |
| --color-scheme | Vega color scheme (category10, viridis, etc.) | - |
| --legend-columns N | Wrap legend entries into N columns for crowded multi-series/pie charts | auto |
| --legend-label-limit PX | Max pixel width for legend labels before Vega truncates them | auto |
| Option | Description | Default |
|---|---|---|
| Show +/-% change annotation at last point | false |
| Zoom Y-axis to 2x data range | false |
| Show only last N data points | all |
| Label min/max peak points | false |
| Label the final data point value | false |
| Option | Description | Default |
|---|---|---|
| Field for multi-series line charts | - |
| Enable stacked bar mode | false |
| Field for stack/color categories | - |
| Option | Description | Default |
|---|---|---|
| OHLC open field | open |
| OHLC high field | high |
| OHLC low field | low |
| OHLC close field | close |
| Option | Description | Default |
|---|---|---|
| Field for pie slice categories | x |
| Render as donut (with center hole) | false |
| Option | Description | Default |
|---|---|---|
| Field for heatmap intensity | value |
| Y axis category field | y |
| Option | Description | Default |
|---|---|---|
| Second Y axis field (independent right axis) | - |
| Title for second Y axis | field name |
| Color for second series | #60a5fa (dark) / #2563eb (light) |
| Chart type for second axis: line, bar, area | line |
| Right-axis format: percent, dollar, compact, integer, decimal4, or d3-format string | auto |
Example: Revenue bars (left) + Churn area (right):
node chart.mjs \ --data '[{"month":"Jan","revenue":12000,"churn":4.2},...]' \ --x-field month --y-field revenue --type bar \ --y2-field churn --y2-type area --y2-color "#60a5fa" --y2-format ".1f" \ --y-title "Revenue ($)" --y2-title "Churn (%)" \ --x-sort none --dark --title "Revenue vs Churn"
| Option | Description | Default |
|---|---|---|
| Field for volume bars (enables dual-axis) | - |
| Color for volume bars | #4a5568 |
| Option | Description | Default |
|---|---|---|
| Y axis format: percent, dollar, compact, decimal4, integer, scientific, or d3-format string | auto |
| Subtitle text below chart title | - |
| Horizontal reference line: "value" or "value,color" or "value,color,label" (repeatable) | - |
| Option | Description | Default |
|---|---|---|
| Static text annotation | - |
| JSON array of event markers | - |
node chart.mjs --type line --data '[...]' \ --title "Iran Strike Odds (48h)" \ --show-change --focus-change --show-values --dark \ --output alert.png
For recent action only:
node chart.mjs --type line --data '[hourly data...]' \ --focus-recent 4 --show-change --focus-change --dark \ --output recent.png
Mark events on the chart:
node chart.mjs --type line --data '[...]' \ --annotations '[{"x":"14:00","label":"News broke"},{"x":"16:30","label":"Press conf"}]' \ --output annotated.png
For proper time series with date gaps:
node chart.mjs --type line --x-type temporal \ --data '[{"x":"2026-01-01","y":10},{"x":"2026-01-15","y":20}]' \ --output temporal.png
Use
--x-type temporal when X values are ISO dates and you want spacing to reflect actual time gaps (not evenly spaced).
Format axis values for readability:
# Dollar amounts node chart.mjs --data '[...]' --y-format dollar --output revenue.png # → $1,234.56Percentages (values as decimals 0-1)
node chart.mjs --data '[...]' --y-format percent --output rates.png
→ 45.2%
Compact large numbers
node chart.mjs --data '[...]' --y-format compact --output users.png
→ 1.2K, 3.4M
Crypto prices (4 decimal places)
node chart.mjs --data '[...]' --y-format decimal4 --output molt.png
→ 0.0004
Custom d3-format string
node chart.mjs --data '[...]' --y-format ',.3f' --output custom.png
Available shortcuts:
percent, dollar/usd, compact, integer, decimal2, decimal4, scientific
Add context below the title:
node chart.mjs --title "MOLT Price" --subtitle "20,668 MOLT held" --data '[...]' --output molt.png
--subtitle works across standard charts plus pie/donut, heatmap, candlestick, stacked, multi-series, volume-overlay, and dual-axis layouts.
Use
--dark for dark mode. Auto-select based on time:
--darkUse
--output-size when the chart is meant for a specific surface:
# Bluesky / OG-style landscape post node chart.mjs --type line --data '[...]' --output-size bluesky --output bluesky-chart.pngInstagram / Threads portrait post
node chart.mjs --type line --data '[...]' --output-size portrait --output portrait-chart.png
Available presets include
twitter, discord, slack, linkedin, bluesky (bsky alias), youtube, instagram, portrait, story, thumbnail, wide, and square.
echo '[{"x":"A","y":1},{"x":"B","y":2}]' | node chart.mjs --output out.png
For advanced charts:
node chart.mjs --spec my-spec.json --output custom.png
After generating a chart, always send it back to the user's channel. Don't just save to a file and describe it — the whole point is the visual.
# 1. Generate the chart node chart.mjs --type line --data '...' --output /data/clawd/tmp/my-chart.png2. Send it! Use message tool with filePath:
action=send, target=<channel_id>, filePath=/data/clawd/tmp/my-chart.png
Tips:
/data/clawd/tmp/ (persistent) not /tmp/ (may get cleaned)action=send with filePath — thread-reply does NOT support file attachments--dark between 20:00-07:00 Israel timeUpdated: 2026-04-06 - added
for crowded categorical/heatmap charts and documented per-axis label rotation; version bumped to 2.6.33--y-label-angle
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.