Generate Chart
Create professional charts and graphs as PNG images from your raw data.
The Generate Chart block allows you to visualize data instantly. Whether you need to report sales figures in a bar chart, track user growth with a line graph, or show market share with a pie chart, this block generates a high-quality PNG image that you can host or send via email.
Core Concept
Think of this block as a private illustrator. You provide the raw numbers and categories, choose a style (like "Pie" or "Bar"), and the illustrator hands you back a finished, polished image of that data.
Configuration
| Field | Required | Description |
|---|---|---|
| Chart Type | ✅ | The visual style of the chart. Options include Bar, Line, Pie, Doughnut, Radar, Polar Area, Scatter, and Bubble. |
| Chart Title | — | A title displayed at the top of the generated image. |
| Width / Height (px) | ✅ | The dimensions of the resulting image. Default is 800x500. |
| Background Color | — | The fill color behind the chart. Default is white (#ffffff). |
| Output Variable | ✅ | The name of the variable where the resulting Base64 string of the chart will be stored. |
Supported Chart Types
- Bar Chart: Best for comparing individual categories (e.g., Sales per Month). Supports vertical and horizontal orientations.
- Line Chart: Ideal for showing trends over time (e.g., Website Traffic).
- Pie & Doughnut: Perfect for showing proportions and "parts of a whole."
- Radar: Used to compare multiple quantitative variables (e.g., Player Stats).
- Scatter & Bubble: Best for showing relationships between two or three variables.
Most charts accept data as a comma-separated list of numbers (e.g., 10, 20, 30) or a JSON array (e.g., [10, 20, 30]).
Error Handling
CHART_TYPE_REQUIRED— Triggered when no chart type is selected.OUTPUT_VAR_REQUIRED— Triggered when no output variable is specified.GENERATE_FAILED— Triggered if the chart engine fails to render the image.
Example (Bar Chart)
- Chart Type:
Bar Chart - Chart Title:
Weekly Sales - Category Labels (X-Axis):
Mon, Tue, Wed, Thu, Fri - Datasets:
- Label:
Store A - Data Values:
120, 150, 180, 90, 210
- Label:
- Output Variable:
sales_chart
Result: The variable {sales_chart} will contain a Base64 string of a bar chart showing the sales for Store A across the week.
