ChartPNG

Recipes

Charts in Google Sheets

Show a chart in a cell with =IMAGE, built from the rows of your sheet.

The result

Bar chart of signups from Monday to Friday
Rendered by ChartPNG from the cells below. Open the PNG.

The sheet

The chart reads this data. Labels in A, numbers in B, the series name in B1.

RowAB
1DaySignups
2Mon12
3Tue19
4Wed7
5Thu15
6Fri22

Copy these formulas

D1: builds the chart config as text

=CONCATENATE("{""type"":""bar"",""data"":{""labels"":[""",TEXTJOIN(""",""",TRUE,A2:A6),"""],""datasets"":[{""label"":""",B1,""",""data"":[",TEXTJOIN(",",TRUE,B2:B6),"]}]}}")

E1: turns the config into an image

=IMAGE("https://chartpng.dev/chart?w=600&h=360&c="&ENCODEURL(D1))

ENCODEURL makes the config safe for a query string. TEXTJOIN lists the labels and the values. Add rows by widening the ranges, for example A2:A20 and B2:B20.

One cell instead of two

=IMAGE("https://chartpng.dev/chart?w=600&h=360&c="&ENCODEURL(CONCATENATE("{""type"":""bar"",""data"":{""labels"":[""",TEXTJOIN(""",""",TRUE,A2:A6),"""],""datasets"":[{""label"":""",B1,""",""data"":[",TEXTJOIN(",",TRUE,B2:B6),"]}]}}")))

Set the size inside the cell

Mode 4 takes a height, then a width, in pixels. The ratio of this chart is 600 by 360, so 400 by 240 keeps it.

=IMAGE("https://chartpng.dev/chart?w=600&h=360&c="&ENCODEURL(D1), 4, 240, 400)

Limits that matter

Sources

Claims about other products, read at their source on 2 Nov 2026.