Actions74
- ai Actions
- array Actions
- audiovideo Actions
- carbone Actions
- charts Actions
- code Actions
- data Actions
- datetime Actions
- events Actions
- files Actions
- geo Actions
- hellospaces Actions
- images Actions
- Get Metadata of an Image
- Scale an Image
- Overlay an Image on another Image
- Scale an Image to Fit Given Dimensions
- Resize an Image
- Mask an Image with Another Image
- Mask an Image with a Circle Mask
- Crops an image by the given x, y, width and height paramters.
- Convert Texts to an Image
- Convert HTML String or URL to an Image
- Generates a QRCode with given text and color.
- Get EXIF from Image
- Remove EXIF from Image
- Modify Image EXIF
- playground Actions
- spreadsheet Actions
- stripe Actions
- youtube Actions
charts → Create a Pie Chart
AI-generatedOverview
This node creates pie or donut charts based on user-supplied data and chart options, then outputs the resulting chart in a chosen format (PDF, PNG, or JPG) as binary data. It is useful for automating the generation of visual reports, dashboards, or presentations where dynamic chart creation is required. For example, you could use it to visualize sales distribution, survey results, or any categorical data within an n8n workflow.
Properties
| Name | Meaning |
|---|---|
| Data Input Mode | Select how to provide your data: - Expression: Enter a JSON array directly. - Manual: Add entries one by one with label, value, and optional color. |
| Data | The dataset to be displayed in the chart. In Expression mode, this is a JSON array. In Manual mode, each entry includes: - Label: Text for the slice - Value: Numeric value - Slice Color: Optional color for the slice |
| Chart Options Input Mode | Choose how to set chart options: - Expression: Enter options as a JSON object. - Manual: Configure options via form fields. |
| Chart Options | Customization settings for the chart, such as title, subtitle, colors, font, legend position, data label formatting, etc. Available options depend on the input mode. |
| Chart Type | How to display your chart: - pie - donut |
| Output Format | Desired output file format: - png - jpg |
| Binary Property | Name of the binary property where the generated chart will be stored. Default is data. |
Output
- The node outputs a binary file containing the generated chart in the selected format (PDF, PNG, or JPG).
- The binary data is attached to the output item under the property name specified in "Binary Property".
- The original JSON data from the input is preserved in the output item's
jsonfield. - If an error occurs and "Continue On Fail" is enabled, the output's
jsonfield will contain anerrorkey with details.
Example output structure:
{
"json": {
// Original input data or error message
},
"binary": {
"data": {
"data": "<base64-encoded chart file>",
"fileName": "chart.pdf",
"mimeType": "application/pdf"
}
}
}
(The property name under "binary" may differ if a custom Binary Property is used.)
Dependencies
- External Service: Requires access to the 1001fx API.
- API Key: You must configure the
1001fxApicredential in n8n. - n8n Configuration: No additional environment variables are needed beyond the credential setup.
Troubleshooting
Missing or Invalid API Key:
Error: Authentication failed or unauthorized.
Solution: Ensure the1001fxApicredential is correctly configured in n8n.Invalid Data Format:
Error: The API returns an error about malformed data.
Solution: Double-check that your data matches the expected structure for the selected input mode.Output Not Found in Binary:
Error: The expected binary property is missing.
Solution: Make sure the "Binary Property" field matches the property you are referencing downstream.Large Data Sets:
Issue: Very large datasets may cause timeouts or memory issues.
Solution: Reduce the size of your data or split into multiple charts.Error Handling:
If "Continue On Fail" is enabled, errors are returned in thejson.errorfield; otherwise, the workflow stops on error.