Bar Chart
Type:
bar_chart
• Category:visualization
Description
Append categorical/time point to a bar chart widget
Parameters
Name | Type | Description | Required | Default |
---|---|---|---|---|
widgetId | string | no | ||
pointExpr | string | Expr -> {value: number, ts?: epoch_ms, category?: str} | no | |
limit | number | no | 500 |
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
-
widgetId
– string
Identifier of the target bar‑chart widget that will receive the new point. -
pointExpr
– string (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”)
} -
limit
– number (optional, default = 500)
Maximum number of points the widget will retain after the insertion. If the widget already containslimit
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:
- Locates the bar‑chart widget with ID
chart-42
. - Evaluates
pointExpr
to obtain a point{value: 125.7, ts: 1728000000, category: "Earnings"}
. - Appends the point to the chart, ensuring the total number of points does not exceed 300 (oldest points are removed if necessary).