Skip to main content

Plot Label

Adds labels to an existing plot visualization.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Plot ID - The unique identifier for the plot to modify.
  • Data Path - The file path to the input data in CSV format.
  • Date Key - The column name to be used as the date (default: "date").
  • Value Key - The column name to be used as the value.
  • Label Key - The column name to be used as the label text.
  • Background Color Key - The column name to be used as the background color (default: "#ff7f0e").
  • Text Color Key - The column name to be used as the text color (default: "#ffffff").

How It Works

The Plot Label node adds labels to an existing plot visualization. When executed, the node:

  1. Retrieves the plot using the provided Plot ID
  2. Reads the label data from the specified Data Path
  3. For each row in the data, adds an annotation to the plot with:
    • Position based on Date Key and Value Key
    • Text from the Label Key
    • Background color from the Background Color Key (if provided)
    • Text color from the Text Color Key (if provided)
  4. Updates the plot with the new annotations

Requirements

  • A valid Plot ID from a previously created plot
  • A CSV file with label data at the specified Data Path
  • Valid column names in the CSV file (date, value, label, and optional color columns)

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid Plot ID
  • Empty or invalid Data Path
  • Empty or invalid Date Key
  • Empty or invalid Value Key
  • Empty or invalid Label Key
  • Issues reading CSV files
  • Missing required columns in the data

Usage Notes

  • The label data should be formatted to match the coordinate system of the original plot
  • Colors can be specified in various formats (hex, rgb, named colors)
  • For best results, ensure your label data aligns properly with the existing plot data