Skip to main content

Bar Chart

Type: bar_chart • Category: visualization

Description

Append categorical/time point to a bar chart widget

Parameters

NameTypeDescriptionRequiredDefault
widgetIdstringno
pointExprstringExpr -> {value: number, ts?: epoch_ms, category?: str}no
limitnumberno500

Help

Overview

The Append Point to Bar Chart worker enriches an existing bar‑chart widget by adding a new data point that can include a numeric value, an optional timestamp, and an optional categorical label. This is useful for visualising financial‑market information such as price updates, volume spikes, or event markers directly on a bar chart.


Inputs

  • widgetIdstring
    Identifier of the target bar‑chart widget that will receive the new point.

  • pointExprstring (expression)
    An expression that evaluates to an object with the following shape:

    {
    "value": number, // required numeric value to plot
    "ts": epoch_ms?, // optional Unix timestamp in milliseconds
    "category": "string"? // optional categorical label (e.g., “Earnings”, “Dividend”)
    }
  • limitnumber (optional, default = 500)
    Maximum number of points the widget will retain after the insertion. If the widget already contains limit points, the oldest entry is discarded to make room for the new one.


Minimal Example Usage

{
"widgetId": "chart-42",
"pointExpr": "{ value: 125.7, ts: 1728000000, category: \"Earnings\" }",
"limit": 300
}

In this example the worker:

  1. Locates the bar‑chart widget with ID chart-42.
  2. Evaluates pointExpr to obtain a point {value: 125.7, ts: 1728000000, category: "Earnings"}.
  3. Appends the point to the chart, ensuring the total number of points does not exceed 300 (oldest points are removed if necessary).