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 Line Chart

AI-generated

Overview

This node allows you to generate a line chart using the 1001fx API and output it in your desired format (PDF, PNG, or JPG). It is especially useful for automating the creation of visual reports, dashboards, or data summaries within n8n workflows. For example, you can visualize sales trends, website analytics, or any time-series data by providing labels and datasets, then receive a ready-to-use chart as a binary file.

Properties

Name Meaning
Labels Input Mode Choose how to provide chart labels:
- Expression: Supply an array via expression.
- Manual: Enter labels manually as multiple string values.
Labels An array of labels to display on the X-axis. Required. The input method depends on "Labels Input Mode".
Datasets Input Mode Choose how to provide datasets:
- Expression: Supply an array via expression.
- Manual: Enter datasets manually with options for label, values, colors, etc.
Datasets The data series to plot. Required. The input method depends on "Datasets Input Mode".
In manual mode, each dataset includes:
- Label
- Values (array)
- Border Color
- Border Dash
- Fill Color
- Tension
Chart Options Input Mode Choose how to provide chart customization options:
- Expression: Supply options as JSON.
- Manual: Set options individually (title, colors, font, axis titles, etc.).
Chart Options Options to customize your chart's appearance and behavior. Includes title, subtitle, alignment, colors, font, axis settings, grid color, padding, etc.
Output Format The desired output format for the chart:
- pdf
- png
- jpg
Binary Property Name of the binary property where the resulting file will be stored (e.g., data).

Output

  • Binary Data:
    The node outputs the generated chart as a binary file (PDF, PNG, or JPG) under the property name specified in "Binary Property".
    • The binary field contains the file data.
    • The original JSON data is preserved in the output item's json property.
    • If there was already binary data present, it is retained alongside the new chart file.

Example Output Structure:

{
  "json": { /* original item data */ },
  "binary": {
    "data": {
      "data": "<base64-encoded chart file>",
      "fileName": "chart.pdf",
      "mimeType": "application/pdf"
    }
  }
}

(The property name under "binary" matches your "Binary Property" setting and the file extension/mime type matches your chosen output format.)

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 needed beyond the credential setup.

Troubleshooting

  • Missing or Invalid Credentials:
    Error: "401 Unauthorized" or similar.
    Solution: Ensure your 1001fx API credentials are correctly set up in n8n.

  • Invalid Input Data:
    Error: "Invalid labels/data/options" or similar.
    Solution: Double-check that your labels and datasets match the required structure and types. For manual entry, ensure all required fields are filled.

  • Output Not Found in Binary:
    Error: "Cannot read property 'data' of undefined" or missing binary output.
    Solution: Make sure "Binary Property" is set and matches the property you expect in downstream nodes.

  • API Errors:
    Error messages from the API may be returned in the output's json.error field if "Continue On Fail" is enabled.
    Solution: Review the error message for details; often relates to malformed input or service issues.

Links and References

Discussion