Image-Charts

Development API · Works globally · Chart-to-image URL builder

TL;DR

Image-Charts replaces the deprecated Google Image Charts API with a drop-in compatible replacement that turns chart parameters in the URL into PNG images. Specify chart type (line, bar, pie, radar), size, data series, colors, labels, and axis — everything goes in the query string. The response is a ready-to-use chart image, no JavaScript rendering library needed. Works for QR codes too.

Quick start: https://image-charts.com/chart?cht=lc&chs=300x100&chd=s:abcdefgh

No API key needed — just make a request!

Try a line chart: https://image-charts.com/chart?cht=lc&chs=300x100&chd=s:abcdefgh

How to Use This API

1. Line Chart

cht=lc for line chart, chs for dimensions, chd for data:

https://image-charts.com/chart?cht=lc&chs=400x200&chd=a:10,25,35,45,60,55,70&chxt=x,y&chxl=0:|Mon|Tue|Wed|Thu|Fri|Sat|Sun

2. Bar Chart

https://image-charts.com/chart?cht=bvg&chs=300x200&chd=a:30,50,80&chco=4CAF50&chtt=Sales+by+Quarter

3. QR Code

https://image-charts.com/chart?cht=qr&chs=200x200&chl=https://example.com&choe=UTF-8

4. JavaScript — Dynamic Chart

const chartUrl = new URL('https://image-charts.com/chart');
chartUrl.searchParams.set('cht', 'lc');
chartUrl.searchParams.set('chs', '500x250');
chartUrl.searchParams.set('chd', `a:${[20, 35, 55, 40, 70, 85].join(',')}`);
chartUrl.searchParams.set('chtt', 'Weekly Website Traffic');

const img = document.createElement('img');
img.src = chartUrl.toString();
document.getElementById('chart-container').appendChild(img);

5. Python — Save Chart to File

import requests

params = {
    'cht': 'bhs',      # Horizontal bar chart
    'chs': '400x150',
    'chd': 'a:85,60,45',
    'chl': 'Python|JavaScript|Go',
    'chco': 'FF6B6B'
}
resp = requests.get('https://image-charts.com/chart', params=params)
with open('language_chart.png', 'wb') as f:
    f.write(resp.content)
print(f'Saved chart ({len(resp.content)} bytes)')

Frequently Asked Questions

What chart types are supported?
Line (lc), bar (bvg/bhs), pie (p/p3), radar (r), scatter (s), Venn (v), QR codes (qr), and more. See the documentation for the full list.
How do I encode chart data?
Use chd=a:val1,val2,... for simple numeric data, chd=s: for simple encoding (single characters), or chd=e: for extended encoding with larger ranges.
What's the maximum image size?
The free tier supports chart sizes up to a reasonable limit (typically 1000px in either dimension). Very large images may be rejected.
Do I need an API key?
No. Image-Charts has a free tier that works without authentication for basic usage.
Can I add multiple data series?
Yes. Separate series with the pipe character: chd=a:10,20,30|40,50,60. Use chco for per-series colors.
Does the API support labels and titles?
Yes. chtt for chart title, chxl for axis labels, chl for data point labels, chxt for visible axes, and chdl for legend series names.

API Details

API URL
https://image-charts.com/chart
Documentation
image-charts.com
Category
Development
Authentication
Not Required (free tier)
Geographic Coverage
Global

What You Can Build