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 | horizontal grouped bars | |
bvs, bhs | vertical / horizontal stacked bars | bhs stacks along the horizontal axis |
bvo | horizontal stacked bars | interpretation choice, documented |
lc, l | line | |
lxy | line through x/y pairs | series 0 holds the x values and every further series is a y set — one line per set, the same rule as cht=s |
ls | sparkline | axes and legend hidden |
p, p3, pc | pie (flat) | p3 is not 3D |
d, dn, donut, pd | doughnut | pd is the Image-Charts name; chli sets the centre label |
pa | polar area | Image-Charts name; one sector per value, chl labels them |
r, rs | radar | rs uses line tension as an approximation |
s, sc | scatter | series 1 is x, each further series is a y point set; points only, no connecting line |
bb | bubble | Image-Charts name: series 0 = x, series 1 = y, series 2 = radius (radius 5 when absent) |
qr | real QR code (decodable) | chl payload, chld error-correction level/margin, choe encoding; always square — not an approximation |
gv, tx, t, v, gom, f, fg | approximate bar chart or text card | 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 rescales s:/e: data: one min,max pair applies to all series, several pairs apply per series, chds=a autoscales from the decoded values and an absent chds keeps Google's full alphabet range (0–61 simple, 0–4095 extended). Text values (chd=t:) are never rescaled — they already carry their magnitudes — but a declared chds span still sets the value-axis range (an explicit chxr wins and the override is reported). A stray prefix digit (chd=t6:…) is tolerated.
A missing value (-1, an empty field, _/__) is a gap: bars leave the slot empty, a line breaks there (an isolated point between two gaps is drawn as a dot so the chart never reads as blank), and a pie leaves that sector out. The gaps are counted in X-UrlChart-Meta.
For scatter (cht=s) the first series is x and each further series is a y point set sharing those x values: chd=t:10,20,30|1,2,3|4,5,6 plots two point sets. A single-series scatter is read as flat x,y pairs and reported degraded. chxr, chg and numeric chxl ticks work on the two numeric axes just as they do on a line chart, and chm point markers set shape, colour and size.
QR codes (cht=qr) — fully supported
cht=qr is not one of the approximate types: it produces a real, standards-compliant QR code that a phone camera decodes (chart kind qr, byte mode, deterministic module grid). It belongs to no approximate group anywhere on this page; GraphViz, formulas, maps, Venn diagrams, funnels and meters are the approximate families.
A QR chart reads chl as the payload (URL-decoded, underscores literal) instead of chd; chd, axes and legends are not used. chld=<L|M|Q|H>|<margin> sets the error-correction level (default L) and quiet-zone margin in modules (default 4, capped at 16). choe accepts UTF-8 (default), Shift_JIS and ISO-8859-1; payload bytes are always written as UTF-8, so choe=UTF-8 is exact and the other two are accepted with a degraded note (they never produce a garbled code). chs sets the canvas: the square code is centred, and a non-square size is reported degraded.
A byte-mode QR holds at most 2953 bytes (version 40, level L). If the payload does not fit the requested level, the same bytes are re-encoded at L (reported degraded). If even L cannot hold it, a text card explains the limit — the payload is never truncated, because a QR that encodes different data is worse than no QR.
https://urlchart.com/chart?cht=qr&chs=200x200
&chl=https%3A%2F%2Fexample.com%2Fp%2F42
&chld=H|4&choe=UTF-8
Parameters
| Parameter | Status | Notes |
|---|---|---|
cht | supported | chart type, see above |
chs | supported | default 300x200; paid: sides clamped to 3000 px, area to 9,000,000 px² (reported when clamped); free: capped at 1000 px per side / 1,000,000 px² and scaled down proportionally with a note in X-UrlChart-Meta (never an error) |
scale, icretina | supported | scale=2 doubles the output pixels (chs=400x300 → an 800x600 image); the tier cap still applies, so a scaled free request is scaled down with a note. icretina=1/2/true is the Image-Charts alias for scale=2 and is reported in X-UrlChart-Meta |
chd, chds | supported | see data encodings |
chl, chdl, chdlp | supported | labels, legend labels, legend position (b, t, l, r); _ becomes a space. A category label wider than the canvas allows is truncated with an ellipsis and reported in X-UrlChart-Meta instead of blanking the chart; a chart whose plot area still collapses is re-rendered without labels and reported |
chxt, chxl, chxr | supported | axis declaration, per-axis labels, per-axis range/step; numeric label lists become explicit ticks, a text label list on a value axis is drawn evenly along it, and a declared axis nothing uses is reported instead of silently hidden |
chxs, chxp | supported | axis colour/size/alignment/tick marks (a repeated chxs is merged per axis and reported); chxp places a value axis' chxl labels at percentages of the axis length (default: even spacing); a category axis keeps its slots and reports the 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; negative values are honoured (the plot area may overflow the canvas) |
chg | supported | grid steps and dash pattern; a step is used only when meaningful for the data span |
chdls | supported | legend text colour and font size (<colour>,<size>) |
chli | supported for doughnut charts | centre label for cht=pd/d; reported unsupported on other chart types |
chf | supported | solid, multi-stop linear gradient (lg) and repeating stripe (ls) 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 |
chbr | supported | rounded bar corners: one radius in pixels (Image-Charts extension); anything else is reported and leaves square corners |
iclocale | supported (en, de, fr) | number format only, for axis ticks and chm=N data labels: en 50,000.5, de 50.000,5, fr 50 000,5; other values are reported and use en |
chm | partially supported | N data labels (bar top, inside a stack segment, above a line point), point markers (o/c/d/s/x), B/b fills, line/range markers (h/H/v/V/D/r/R) and text/flag/annotation/arrow markers (t/f/A/a); candlesticks, rectangles and error bars are accepted and ignored (degraded), and a D line marker whose point selection is a single point draws nothing and says so |
chof | supported | png (default), jpg, webp or pdf; the response Content-Type names the format, and a PDF is a one-page file that embeds the chart at its pixel size. An unknown value is reported and PNG is returned |
chxtc | degraded | custom tick-mark lengths are accepted and not drawn; the note appears in X-UrlChart-Meta and in the Tester |
chld, choe | supported for cht=qr | QR error-correction level/margin and output encoding; on other chart types they are reported unsupported |
chan, chp, chty, chtm | unsupported | animated GIF, pie rotation, map type, 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.
- Value axes start at zero unless the URL declares a range (
chxr,chdsor numericchxlticks), and an unlabelled line chart shows the point indexes (0, 1, 2 …) on the x axis.
Known gaps
- GraphViz, formulas, maps, Venn diagrams, funnels and meters render as approximations. QR codes do not:
cht=qrrenders a real, decodable QR code (see QR codes). - Animated GIF, map labels, pie rotation, map type, map marker size, tick lengths, candlestick/rectangle/error-bar markers and x/y-placed 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.