Documentation
Legacy parameter reference
Every parameter below is implemented in the current release unless the table says otherwise. This page is the public summary of our compatibility contract; the project repository carries the full decision record (docs/legacy-params.md) and the 41-URL regression report.
Graceful degradation policy
- Unknown parameters are ignored and listed in the compatibility report.
- Invalid values fall back to a default and are reported as degraded.
- A decodable payload always produces a PNG — even if that means an approximate chart.
400 JSONis returned only when the data payload cannot be interpreted at all (missingchd, unknown encoding letter, no numeric value).- A
200response never carries an error image or error text.
Chart types (cht)
cht | Rendered as | Notes |
|---|---|---|
bvg, bv, b | vertical grouped bars | default when cht is missing |
bhg, bh, bhs | horizontal grouped bars | |
bvs | vertical stacked bars | |
bvo | horizontal stacked bars | interpretation choice, documented |
lc, l | line | |
lxy | line with x/y pairs | each series is read as x0,y0,x1,y1,… |
ls | sparkline | axes and legend hidden |
p, p3, pc | pie (flat) | p3 is not 3D |
d, dn, donut | doughnut | |
r, rs | radar | rs uses line tension as an approximation |
s, sc | scatter | x/y pairs, no connecting line |
qr, gv, tx, t, v, gom, f, fg | approximate bar chart or text card | QR, GraphViz, formula, map, Venn, meter, funnel — reported degraded |
Data (chd, chds)
| Encoding | Syntax | Behaviour |
|---|---|---|
| Text | chd=t:10,20,30|1,2,3 | real values, | separates series, -1 is a gap |
| Awesome alias | chd=a:30010,-30000.1 | Image-Charts format; treated as text (real magnitudes, automatic scaling) |
| Simple | chd=s:AZa | one character per value, alphabet A–Z a–z 0–9, _ is missing, scaled through chds |
| Extended | chd=e:AZaz | two characters per value, alphabet A–Z a–z 0–9 - ., _/__ missing |
chds applies to s:/e: data. chds=a or absent autoscales (0–61 simple, 0–4095 extended); one min,max pair applies to all series, several pairs apply per series. A stray prefix digit (chd=t6:…) is tolerated.
Parameters
| Parameter | Status | Notes |
|---|---|---|
cht | supported | chart type, see above |
chs | supported | default 300x200; sides clamped to 2000 px, area to 4,000,000 px² (reported when clamped) |
chd, chds | supported | see data encodings |
chl, chdl, chdlp | supported | labels, legend labels, legend position (b, t, l, r); _ becomes a space |
chxt, chxl, chxr | supported | axis declaration, per-axis labels, per-axis range/step |
chxs, chxp | supported | axis colour/size/alignment/tick marks; label positions |
chco | supported | series colours as RRGGBB or RRGGBBAA (hex without #); a few CSS names accepted |
chtt, chts | supported | title and title style (colour, size, alignment) |
chma | supported | margins: left, right, top, bottom, plus legend margins |
chg | supported | grid steps and dash pattern; a step is used only when meaningful for the data span |
chf | supported | solid and multi-stop linear gradient fills for the image background and the plot area |
chbh, chls | supported | bar width/gap (Chart.js percentages approximate pixel widths); per-series line width and dash |
chm | partially supported | N data labels, o/c/d/s/x/t point markers, B area fills; annotation markers are accepted and ignored (degraded) |
chof | supported when png | PNG is the only output; other values are reported unsupported |
chxtc | degraded | accepted and ignored |
chan, chld, chp, chty, chli, chtm | unsupported | animated GIF, map labels, pie rotation, map type, marker size, map region — reported, chart still renders |
Multi-axis
Every declared chxt axis becomes a real scale. The first x is bottom, a second x is top, the first y is left, a second y is right, r is right and t is top:
https://urlchart.com/chart?cht=lc&chs=560x320
&chd=t:120,180,150,210,260,300|800000,900000,850000,950000,880000,990000
&chxt=x,y,y
&chxr=1,0,350|2,0,1000000
&chco=2f5fe0,dc3912
Series are assigned to the declared value axes in declaration order. When two or more value axes declare a range (chxr or numeric chxl), each series is matched to the axis whose range fits its data best; a series outside a declared range gets an autoscaled axis instead of a blank chart, and the difference is reported as degraded.
Numbers
- Axis ticks and
chm=Nlabels use thousand separators by default:45,000,000. - Decimals follow the tick step; integers are not padded with noise.
chm=N*f…*formats:f$currency,f0/f2fixed decimals,f1%percent,f0Kliteral suffix.- Labels are clamped to the canvas so a long number is never cut off at the edge.
Known gaps
- QR codes, GraphViz, formulas, maps, Venn diagrams, funnels and meters render as approximations.
- Animated GIF, map labels, pie rotation, map type, map marker size, tick lengths and annotation markers are accepted and ignored.
- Smoothed radar uses line tension; 3D pies are flat; bar pixel widths are approximated from percentages.
- Client-side locale formatting (
iclocaleand friends) is out of scope: numbers are formatted with thousand separators and a dot decimal separator.
Check the specific URL. The Drop-in Tester returns the supported/degraded/ignored list for any Google, Image-Charts or QuickChart URL — the same rules, before you migrate.