Documentation
One URL creates a chart. Copy the code, drop it in your Substack, Notion, blog, or any site. Or teach your ChatGPT, Claude, Gemini or any LLM to generate charts for you.
Embed Options
Image Tag
The simplest option. Just an <img> tag with a URL. Works in markdown, email, Notion, anywhere.
<img src="https://getchartkit.com/api/chart?type=bar&labels=Q1,Q2,Q3&s0=10,20,30&s0name=Sales" alt="Sales chart" />Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | "bar" | "line" | "pie" | "area" | "horizontal-bar" | "donut" |
labels | string | Yes | Comma-separated category labels, e.g. labels=Q1,Q2,Q3 |
s0, s1, s2… | string | Yes | Comma-separated numbers per series, e.g. s0=10,20,30 |
s0name, s1name… | string | No | Name for each series, e.g. s0name=Revenue |
title | string | No | Chart title (use + for spaces) |
w | number | No | Width in pixels (default: 600) |
h | number | No | Height in pixels (default: 400) |
legend | boolean | No | Show legend (default: true) |
valueFormat | string | No | "number" | "currency" | "percent" | "compact" (default: "number") |
currencySymbol | string | No | Currency symbol when valueFormat is "currency" (default: "$") |
dataLabels | boolean | No | Show formatted values on chart marks (default: false). Auto-enabled for grouped bar/horizontal-bar with compact or currency format. |
dataLabelFont | string | No | "system" | "oxanium" | "tektur" (default: "system") |
dataLabelStyle | string | No | "outside" | "large" | "inside" (default: "outside"). Bar/hbar: large = top/end, inside = on bar. |
axisSize | string | No | "default" | "large" | "xl" — X/Y axis tick label size (default: "default") |
colorBy | string | No | "series" (default) | "category" — bar/hbar: category colors each label from the palette |
format | string | No | "svg" | "png" | "jpg" (default: "svg") |
scale | number | No | Raster scale factor (default: 2) |
Teach Your ChatGPT, Claude or Gemini
Copy this prompt and paste it into ChatGPT, Claude, Gemini or any LLM.
When I ask you to create a chart, you must:
1. Generate a valid ChartKit URL.
2. Render the chart directly in the chat as a Markdown image using this exact format:

3. Then output the same chart as a copy-paste HTML <img> tag inside a code block.
4. If I ask for an article, include the rendered chart inside the article body as HTML using an <img> tag, not just as plain text.
5. Do not explain anything before or after the result.
6. Do not mention ChartKit instructions, libraries, or API keys.
7. Always return only the final content.
ChartKit base URL:
https://getchartkit.com/api/chart
Supported parameters:
- type (required): bar, line, area, pie, donut, or horizontal-bar
- labels (required): comma-separated category labels, e.g. labels=Q1,Q2,Q3,Q4
- s0, s1, s2... (at least s0 required): comma-separated numbers for each data series, e.g. s0=10,20,30
- s0name, s1name...: name for each series, e.g. s0name=Revenue
- title: chart title (use + for spaces), e.g. title=Monthly+Sales
- w: width in pixels (default 600)
- h: height in pixels (default 400)
- legend: true or false (default true)
- valueFormat: controls how values are displayed on axes (default: number)
number - raw numbers with locale separators (1,000,000)
currency - adds a currency symbol ($1,000,000). Use with currencySymbol.
percent - appends % (42%)
compact - shortens large numbers with K, M, B, T suffixes (1.5M, 2.3B). Pass full values in the data - the system formats them automatically.
- currencySymbol: currency symbol when valueFormat is currency, e.g. $, €, £ (default $)
- dataLabels: true or false (default false) - show formatted values on bars, points, and slices. Grouped bar/horizontal-bar charts with compact or currency valueFormat auto-enable labels on each bar (top placement).
- dataLabelFont: system (default), oxanium, or tektur - display font for on-chart values. Non-system fonts auto-enable dataLabels.
- dataLabelStyle: outside (default), large, or inside
bar / horizontal-bar: large = numbers on top of bar (or at end for horizontal), inside = numbers on the bar
line / area / pie / donut: outside = small outside, large = big outside, inside = on point or slice
- axisSize: default (default), large, or xl - makes X and Y axis tick labels bigger (bar, line, area, horizontal-bar)
- colorBy: series (default) or category - for bar / horizontal-bar, category gives each label its own palette color (rankings, model comparisons, country lists)
- format: svg, png, or jpg (default svg)
Rules for values:
- Use comma-separated labels
- Use comma-separated numeric series values
- Encode spaces in URL with +
- When money is provided in millions or billions, convert to full numbers if needed unless I explicitly want shortened raw input
- Use compact formatting when I want K/M/B/T style labels
- Use currency formatting when I ask for money
- Use percent formatting when I ask for percentages
- For presentation charts with readable numbers, prefer dataLabels=true, axisSize=large, and dataLabelStyle=large (top) or inside (on bar)
- For single-series ranking or comparison bars (models, countries, products), set colorBy=category so each bar is a different color
Output rules:
- First show the rendered Markdown image
- Then show the same chart as HTML in a code block
- If I ask for an HTML article, output the article in HTML and embed charts with real <img src="..."> tags inside the article where relevant
- No explanation
---
Create a horizontal bar chart showing startup funding rounds:
Data:
- Series A: $8.5M
- Series B: $42M
- Series C: $185M
- Series D: $750M
Use compact value format.
Title: Startup Funding RoundsJavaScript Embed
Include the script, add data-* attributes. Gets you interactive, client-side rendering.
<script src="https://getchartkit.com/cdn/v1.js"></script>
<div data-chartkit data-type="bar" data-labels="Q1,Q2,Q3" data-series-0="10,20,30" data-series-0-name="Sales"></div>Data Attributes
| Parameter | Type | Required | Description |
|---|---|---|---|
data-chartkit | - | Yes | Marks the element as a chart container (no value needed) |
data-type | string | Yes | "bar" | "line" | "pie" | "area" | "horizontal-bar" | "donut" |
data-labels | string | Yes | Comma-separated labels, e.g. "Q1,Q2,Q3" |
data-series-0, -1… | string | Yes | Comma-separated numbers per series, e.g. "10,20,30" |
data-series-0-name… | string | No | Name for each series |
data-series-0-color… | string | No | Hex color per series |
data-title | string | No | Chart title |
data-width | number | No | Width in pixels (default: 600) |
data-height | number | No | Height in pixels (default: 400) |
data-legend | boolean | No | Show legend (default: true) |
data-value-format | string | No | "number" | "currency" | "percent" | "compact" (default: "number") |
data-currency-symbol | string | No | Currency symbol when value format is "currency" (default: "$") |
data-data-labels | boolean | No | Show formatted values on chart marks (default: false) |
data-data-label-font | string | No | ChartKit default (system), oxanium, or tektur |
data-data-label-style | string | No | outside, large, or inside (bar/hbar: large = top/end, inside = on bar) |
data-axis-size | string | No | default, large, or xl — axis tick label size |
data-color-by | string | No | series (default) or category — bar/hbar per-label colors |
iFrame
Full isolation from the host page. Drop it in and forget about it.
<iframe src="https://getchartkit.com/api/chart?type=bar&labels=Q1,Q2,Q3&s0=10,20,30&s0name=Sales" width="600" height="400" style="border:none;"></iframe>REST API
Generate charts server-side with a single HTTP request. Send a JSON body to POST /api/render and get back SVG, PNG, or JPG.
POST /api/render
Accepts a JSON chart configuration and returns the rendered chart image.
curl -X POST https://getchartkit.com/api/render \
-H "Content-Type: application/json" \
-d '{
"type": "bar",
"title": "Quarterly Sales",
"labels": ["Q1", "Q2", "Q3", "Q4"],
"datasets": [
{ "name": "2024", "data": [42, 58, 65, 71] },
{ "name": "2025", "data": [51, 63, 72, 80] }
],
"width": 800,
"height": 500,
"legend": true,
"valueFormat": "currency",
"currencySymbol": "$"
}'Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | "bar" | "line" | "pie" | "area" | "horizontal-bar" | "donut" |
labels | string[] | Yes | Category labels for the x-axis |
datasets | Dataset[] | Yes | Array of { name, data, color? } |
title | string | No | Chart title displayed at the top |
width | number | No | Width in pixels (default: 600) |
height | number | No | Height in pixels (default: 400) |
legend | boolean | No | Show legend (default: true) |
valueFormat | string | No | "number" | "currency" | "percent" | "compact" (default: "number") |
currencySymbol | string | No | Currency symbol when valueFormat is "currency" (default: "$") |
dataLabels | boolean | No | Show formatted values on chart marks (default: false). Auto-enabled for grouped bar/horizontal-bar with compact or currency format. |
dataLabelFont | string | No | "system" | "oxanium" | "tektur" (default: "system") |
dataLabelStyle | string | No | "outside" | "large" | "inside" (default: "outside"). Bar/hbar: large = top/end, inside = on bar. |
axisSize | string | No | "default" | "large" | "xl" — X/Y axis tick label size (default: "default") |
colorBy | string | No | "series" (default) | "category" — bar/hbar: category colors each label from the palette |
format | string | No | "svg" | "png" | "jpg" (default: "svg") |