1001fx - NoCode functions icon

1001fx - NoCode functions

1001fx is a set of functions for any automation platform. Our functions are simple, very well tested, scalable and offer features that most automation platforms do not offer.

Actions74

charts → Create a Bar Chart

AI-generated

Overview

The "Create a Bar Chart" operation in the charts resource of this n8n node allows users to generate bar charts from structured data. The node supports both manual and expression-based input for chart data and customization options, and outputs the resulting chart in PDF, PNG, or JPG format as binary data. This is useful for automating report generation, visualizing workflow results, or embedding dynamically generated charts into documents or emails.

Practical examples:

  • Automatically create sales performance bar charts from CRM data.
  • Visualize survey results or poll outcomes in a workflow.
  • Generate custom-branded charts for inclusion in automated reports.

Properties

Name Meaning
Data Input Mode Choose how to provide chart data:
- Expression: Supply data as a JSON array.
- Manual: Enter data entries one by one (label, value, colors).
Data The dataset for the bar chart. If using Expression mode, provide an array of objects. In Manual mode, add multiple entries with:
- Label
- Value
- Background Color
- Border Color
Chart Options Input Mode Choose how to provide chart customization options:
- Expression: Supply options as a JSON object.
- Manual: Set individual options via UI fields.
Chart Options Customization settings for the chart. In Expression mode, provide as JSON. In Manual mode, set options such as:
- Chart Title & Alignment
- Colors (title, subtitle, background, grid, axis)
- Font, padding, axis titles, etc.
Output Format Desired output file type: pdf, png, or jpg.
Binary Property Name of the binary property where the generated chart will be stored (e.g., data).

Output

  • Binary Data: The node outputs the generated bar chart as a binary file in the specified format (PDF, PNG, or JPG).
    • The binary data is attached to the output item under the property name specified in Binary Property.
    • Any existing binary data on the input item is preserved unless overwritten by the same property name.
  • JSON: The original JSON data from the input is preserved in the output item's json field.

Dependencies

  • External Service: Requires access to the 1001fx API.
  • API Key: You must configure the 1001fxApi credential in n8n.
  • n8n Configuration: No special environment variables are required beyond standard credential setup.

Troubleshooting

Common Issues:

  • Missing or Invalid API Key: If the 1001fxApi credential is not set up or is invalid, the node will fail to connect to the service.
  • Incorrect Data Structure: Supplying malformed data (e.g., missing required fields like label or value) may result in errors or empty charts.
  • Unsupported Output Format: Only pdf, png, and jpg are supported; other values will cause errors.
  • Binary Property Overwrite: If the specified binary property already exists, it will be overwritten.

Error Messages:

  • "error": "<message>" in the output JSON indicates a failure, often due to API issues, bad input, or misconfiguration.
  • If you see parsing errors or unexpected output, check that your data and options match the expected structure.

Links and References

Discussion