one:solutions Time series chart - stack mode
Native ThingsBoard time series chart with corrected stack mode: at the same timestamp, positive values stack upward and negative values stack downward independently in the same bar column. All native settings, tooltips, thresholds, legend and zoom are preserved.
one:solutions Time series chart - stack mode
Displays time series data as stacked bars where positive values stack upward and negative values stack downward from the zero line — independently, in the same bar column.
Features
- Correct stacking of mixed positive/negative values (positives accumulate up, negatives accumulate down)
- Zero line as the shared baseline, with correct signed segment size and series color
- 100% native ThingsBoard chart underneath — all standard settings panels, per-key settings, tooltips, thresholds, legend, data zoom and dark mode work unchanged
- Fully self-contained: no external resources or CDN scripts
- With stacking disabled (or all-same-sign data), behaves identically to the standard Time series chart
Data keys
- Any numeric timeseries keys (1 or more) — no specific key names required
- Set each stacked key’s chart type to Bar: key settings → Advanced → chart type
- Keys of type Line are drawn as regular lines on top of the stacked bars
- Additional latest data keys are supported, as in the standard chart
Typical use cases
| Scenario | Positive values | Negative values |
|---|---|---|
| Energy management | Consumption | Solar feed-in |
| Battery systems | Charging | Discharging |
| Finance / billing | Income | Expenses |
| Inventory / balance | Additions | Removals |
Configuration
- Stacked (Appearance) — enabled by default; turn off for side-by-side bars
- Y-axis min/max (Axes) — optional; set explicitly if stacked totals far exceed individual values
- All other options are the standard Time series chart settings
Compatibility
Built and verified on ThingsBoard 4.0 (CE and PE). Uses only the platform’s bundled chart engine — no Professional Edition features required. If a future ThingsBoard version changes internal APIs, the widget safely falls back to standard native rendering.
Share Your Widget with the Community
Built a custom widget? Export it as a JSON from ThingsBoard and publish it to the IoT Hub through a simple 4-step wizard (Upload, Listing, Readme, Review & Submit). Share it with thousands of ThingsBoard developers worldwide and get featured in the catalog.