Español

Lee este artículo en español.

How to turn data into a chart automatically

You usually need to turn data into a chart for one of these reasons:

Doing it by hand in Excel or Google Sheets works once. The problem is when the chart needs to update itself (every order, every response, every day) and there's no one left to open a program, paste the data and export an image each time.

From data to image in one step

With JSON to chart you send the chart type, the labels (the categories on the X axis, or the name of each slice) and the values, and you get back the finished image. There are five types available: bar and line for comparing categories or showing change over time, pie and doughnut for showing how a total splits up, and radar for comparing several variables at once. You can send up to 50 labels per chart, and give it an optional title if you want extra context.

Several series in the same chart

You're not limited to a single line of data: you can send up to 10 series in the same chart, for example to compare this year against last year on the same bars, or the results of two products on the same line chart. Each series needs as many values as the chart has labels. The exception is pie and doughnut charts, which only take one series, which makes sense since they show the parts of a single total.

Size, format, and how it arrives

By default the image comes out at 800x500 pixels, but you can request the exact size you need (between 200 and 2000 pixels) so it fits the space in your email or report without cropping. The default format is PNG, ready to embed anywhere; if you'd rather have a vector that scales without losing quality, request SVG.

The result arrives by default inside a JSON, with the image already in base64 in the image field, handy for dropping straight into the next step of your workflow, like an email, without saving an intermediate file. If you'd rather have the image file directly, request it with "output": "binary". The price stays the same either way: 1 chart generated = 1 credit, whatever type or size you asked for.

When automating it pays off

For a one-off chart for a single presentation, doing it by hand gives you more control over the design. Where this pays off is when the chart repeats: the weekly sales report, the daily summary a client receives, the bot that posts metrics to Slack every morning. Once the data keeps changing on its own and the chart has to keep up, generating it automatically saves you from opening Excel over and over for the same thing.

FAQ

What chart types can I generate? Bar, line, pie, doughnut and radar. Pick based on what you're showing: comparing categories, change over time, how a total splits up, or comparing several variables at once.

Can I compare several periods in the same chart? Yes, up to 10 series in the same chart (say, this year against last year), as long as each series has as many values as there are labels. The exception is pie and doughnut, which only take one series.

What format does the image come back in? By default, a JSON with the image in base64 inside the image field. If you'd rather have the image file directly, request binary output instead.

Can I choose the chart's size? Yes, width and height between 200 and 2000 pixels (800x500 by default), so it fits wherever you need without having to crop it afterward.

Try these tools

You'll find the full instructions for JSON to chart, with examples for n8n, Make and your own code. And if you don't have an account yet, you can create one for free.