The
chart operation is fully Workers-compatible - no DOM, Canvas, or external dependencies. All rendering is pure string manipulation.Quick Start
Simple bar chart:Configuration
Chart Types
Bar Chart
Vertical or horizontal bar charts with optional grouping or stacking.Line Chart
Line charts with single or multiple series, optional smoothing.Area Chart
Filled area charts with gradient fills, similar to line charts.Pie & Donut Charts
Circular charts for showing proportions.Scatter Plot
Show relationships between two numeric variables.Sparkline
Minimal inline charts for dashboards and tables.Output Formats
SVG (Default)
Server-rendered SVG string. Best for embedding directly in HTML.URL (QuickChart.io)
Generate an image URL for use in emails, Slack, etc.https://quickchart.io/chart?c={...}
QuickChart URLs are generated client-side. The chart config is URL-encoded, so very large datasets may exceed URL length limits.
Vega-Lite Spec
Generate a Vega-Lite specification for client-side interactive rendering.HTML
Self-contained HTML document with embedded SVG.Theming
Built-in Themes
Custom Colors
Override the color palette:Reference Lines
Add horizontal reference lines for targets, thresholds, or averages.Annotations
Add annotations to highlight specific data points or ranges.Line Annotation
Draw a horizontal or vertical line at a specific value:Band Annotation
Highlight a range of values:Point Annotation
Mark a specific point:Multiple Annotations
Combine multiple annotations:Auto Detection
Let the chart agent automatically choose the best chart type:- Small categorical data (2-6 items with string + number) → pie
- Time-series data (date field + numeric) → line
- Two numeric fields without categories → scatter
- Single numeric array → sparkline
- Default → bar
Number Formatting
Format axis values and labels:Complete Dashboard Example
Performance
Chart generation is fast since it’s pure string manipulation:Error Handling
Missing Required Fields
chart: bar chart requires config.x and config.y
Invalid Chart Type
chart: invalid type "histogram". Must be one of: bar, line, area, pie, donut, scatter, sparkline
Empty Data
chart: config.data must be a non-empty array

