Free plan

Chart

Draw a bar, line or pie chart from your numbers
POST
/v1/render/chart

About this tool

This tool turns numbers into a chart picture. Paste your data or add a file, such as CSV or Excel. Choose the chart type, and which columns go across, up and for colour. Add a title and pick the size and theme. Experts can also give a Vega-Lite description (a chart recipe written as text).
For example, you show monthly sales as a bar chart for a report.

How to use it

  1. Choose this tool.
  2. Paste your data, or add a CSV, Excel or JSON file with Upload or drag and drop.
  3. Choose the chart type and the columns for each axis.
  4. Add a title and pick the size or look, then press Generate.
  5. Download the chart.

What you get back

You get a chart as a picture (or PDF or SVG). Download it and put it in your report.
GOOD TO KNOW
Not available as an async job.
TEST IT LIVE

Try Chart in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
Render
Plan
Free
Method
POST
Endpoint
/v1/render/chart
Tool ID
render.chart
Authentication
API key
Accepts
XLSX, ODS, MD, HTML, XLS, CSV +9 more
Background jobs
Yes
Usage group
Render
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/render/chart" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'type=bar' \
  -F 'output=png' \
  -F 'width=800'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.render.chart({
    "type": "bar",
    "output": "png",
    "width": 800
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->render()->chart([
    'type' => 'bar',
    'output' => 'png',
    'width' => 800,
]);
echo $result->requestId;
FAQ

Frequently asked questions

A chart from a few simple fields (type, data, x, y, color) or a Vega-Lite specification, as SVG, PNG, JPEG, WebP, AVIF or PDF. The rows can be sent inline (data), or uploaded / fetched as a CSV, TSV, spreadsheet (XLSX, ODS) or JSON file (data_file, or its web address).

Chart accepts XLSX, ODS, MD, HTML, XLS, CSV, JSON, XML, TSV, NDJSON, YAML, TOML and 3 more. You can send several files in one request.

Chart is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/render/chart with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.