API Reference

Learn how to use the Chart Generation API to create and customize data visualizations in PNG or SVG formats. This documentation provides details on request structure, parameters, and examples for seamless integration.

The Chart Generation API is perfect for projects that require charts without the hassle of integrating external libraries. Ideal for programming languages with limited charting support, it allows you to generate visualizations in PNG or SVG formats that can be easily integrated into any application, letting you focus on displaying results rather than complex configurations.​

📘

The API supports only certain types of charts. You can generate charts by passing configuration data through the option object, following the ECharts format, via a POST request. This allows you to customize your chart's design and content, but only charts that can be defined within the supported options structure will work.

Example

To generate a chart using our API, make sure to send the request body in the following JSON format. Adjust the values according to your specific needs:

{
  "output": "svg",
  "width": 900,
  "height": 700,
  "option": {
    "legend": {
      "top": "bottom"
    },

    "series": [
      {
        "name": "Nightingale Chart",
        "type": "pie",
        "radius": [50, 250],
        "center": ["50%", "50%"],
        "roseType": "area",
        "itemStyle": {
          "borderRadius": 8
        },
        "data": [
          { "value": 40, "name": "rose 1" },
          { "value": 38, "name": "rose 2" },
          { "value": 32, "name": "rose 3" },
          { "value": 30, "name": "rose 4" },
          { "value": 28, "name": "rose 5" },
          { "value": 26, "name": "rose 6" },
          { "value": 22, "name": "rose 7" },
          { "value": 18, "name": "rose 8" }
        ]
      }
    ]
  }
}

Response Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "string",
      "format": "base64",
      "description": "The base64 encoded image of the barcode."
    }
  },
  "required": ["data"]
}
Language
Credentials
Header
Click Try It! to start a request and see the response here!