logo elektroda
logo elektroda
X
logo elektroda

OpenBeken Charts Driver - configurable and flexible measurement history on your device

p.kaczmarek2  66 6375 Cool? (+6)
📢 Listen (AI):

TL;DR

  • OpenBeken adds a scriptable charts driver for plotting arbitrary variables and multiple axes directly on the device, without Home Assistant.
  • The workflow uses chart_create, chart_setVar, chart_setAxis, and chart_add/chart_addNow in autoexec.bat, with NTP time or repeating events for live history.
  • Sample configs show 16-sample charts, including temperature-only, temperature plus humidity on two axes, and even VCP voltage/current/power on three axes.
  • A DHT11 demo uses chart_create 48 2 2, starts NTP, and logs temperature and humidity every 60 seconds with addRepeatingEvent.
  • Early builds may need IndexRefreshInterval 100000, and planned features include per-variable RGB colors, alternative chart.js paths, and persistent storage.
Generated by the language model.
Temperature and humidity chart from DHT11 sensor
OpenBeken now features a scriptable charts driver that allows you to display an arbitrary number of variables with an arbitrary number of axes. This means you can, for example, show your temperature and humidity history, or a voltage or power, or practically any variable you want. This is done entirely without Home Assistant, everything is handled by OBK device. Here I will show you a basic configuration of such driver and some sample scripts utilizing that.

This tutorial assumes you have OBK displayed:
https://github.com/openshwprojects/OpenBK7231T_App
The following will run on many platforms, including:
- BK7231T (WB3S, WB2S, WB2L, etc)
- BK7231N (CB2S, CB2L, WB2L_M1, etc)
- BK7231M, this is a non-Tuya version of BK7231N with 00000000 keys, also sometimes in BL2028 flavour
- T34 is based on BK7231N, see flashing trick
- BL2028N is a Belon version of BK7231N
- XR809 (XR3, etc)
- BL602 (SM-028_V1.3 etc), see also BL602 flash OBK via OTA tutorial
- LF686 (flash it as BL602)
- W800 (W800-C400, WinnerMicro WiFi & Bluetooth), W801
- W600 (WinnerMicro chip), W601 (WIS600, ESP-01W, TW-02, TW-03, etc)
- LN882H by Lightning Semi - datasheet, see flashing how-to, see sample device teardown and flashing, see new flash tool, see dev board
- Windows, via simulator
- ESP32 (WIP platform)

Let's start with checking if your build has "charts" driver:
Screenshot of the BK7231T_WB3S command tool indicating missing charts driver.
If it's not present, set the ENABLE_DRIVER_CHARTS to 1 in obk_config.h for the platform of your choice by following paragraphs "Per-Pull Request Builds" and "Customizing your own build" in this guide to get your custom build made online (no toolchain required):
https://www.elektroda.com/rtvforum/topic4033833.html#20946719

Ok, now I assume that you have "charts" driver in your build.

So, the charts can be created in autoexec.bat. If you don't know where to create autoexec.bat, see this tutorial:



Now, once you have basics ready, it's time to check some sample chart scripts!

First, you need to know the basic steps and then we'll look at sample scripts. So, steps are the following:
1. start the chart driver
2. setup the samples count (they are stored in a loop), the number of variables and the number of axes
3. set the variable names and their respective axes
4. setup the axes
5. add data to chart
It may sound complicated at first but it's very easy, let's check the samples.

And before I forgot - in the early versions you may also need to add one more command to autoexec.bat - you need to disable page refresh with:

IndexRefreshInterval 100000

This may be fixed soon. The dynamic charts update is not yet ready.

Sample chart 1 - simplest temperature chart
This is an example of a basic chart displaying temperature data over time, however, for a demonstration purposes, the data is hardcoded. The chart holds 16 data samples and focuses on a single variable, "Temperature", plotted on one axis.

// Sample 1
// single variable chart
startDriver charts
// chart with max 16 samples, 1 variable and single axis
chart_create 16 1 1
// set the temperature variable with axis
chart_setVar 0 "Temperature" "axtemp"
// setup axis
// axis_index, name, flags, label
chart_setAxis 0 "axtemp" 0 "Temperature (C)"
// for demonstration purposes, add some data at fixed times
// First argument is NTP time value
chart_add 1725606094 20
chart_add 1725616094 22
chart_add 1725626094 26
chart_add 1725636094 30
chart_add 1725646094 28
chart_add 1725656094 27

Result:
Line chart showing temperature changes throughout the day.

Sample chart 2 - multiple variables of single type
The same approach can be used to display multiple measurements of the same type. Here, for example, we display 3 different temperature values:

// Sample 2
// Three temperature variables chart
startDriver charts
// chart with max 16 samples, 3 variables and single axis
chart_create 16 3 1
// set variables along with their axis
chart_setVar 0 "Kitchen" "axtemp"
chart_setVar 1 "Outside" "axtemp"
chart_setVar 2 "Bedroom" "axtemp"
// setup axis
// axis_index, name, flags, label
chart_setAxis 0 "axtemp" 0 "Temperature (C)"
// for demonstration purposes, add some data at fixed times
// First argument is NTP time value
chart_add 1725606094 20 15 22
chart_add 1725616094 22 16 23
chart_add 1725626094 26 17 24
chart_add 1725636094 30 14 25
chart_add 1725646094 28 13 22
chart_add 1725656094 27 15 21

Result:
A chart showing three temperature variables for different locations over time.


Sample chart 3 - two y axes
Charts driver can also offer you multiple y axes. This way you can display, for example, both temperature and humidity data:


// Sample 3
// Two temperatures and one humidity with separate Temperature/Humidity axes

startDriver charts
// chart with max 16 samples, 3 variables and two separate vertical axes
chart_create 16 3 2
// set variables along with their axes
chart_setVar 0 "Room T" "axtemp"
chart_setVar 1 "Outside T" "axtemp"
chart_setVar 2 "Humidity" "axhum"
// setup axes
// axis_index, name, flags, label
chart_setAxis 0 "axtemp" 0 "Temperature (C)"
// flags 1 means this axis is on the right
chart_setAxis 1 "axhum" 1 "Humidity (%)"
// for demonstration purposes, add some data at fixed times
// First argument is NTP time value
chart_add 1725606094 20 15 89
chart_add 1725616094 22 16 88
chart_add 1725626094 26 17 91
chart_add 1725636094 30 14 92
chart_add 1725646094 28 13 92
chart_add 1725656094 27 15 91

Result:
Chart showing room temperature, outside temperature, and humidity.

Sample chart 4 - battery and pressure
Of course, you can display any kind of data you want. Here is for example a voltage and the pressure chart:

// Sample 4
// Battery voltage + pressure
startDriver charts
// chart with max 16 samples, 2 variables and 2 axes
chart_create 16 2 2
// set variables along with their axis
chart_setVar 0 "Battery Voltage" "axvolt"
chart_setVar 1 "Pressure" "axpress"
// setup axis
// axis_index, name, flags, label
chart_setAxis 0 "axvolt" 0 "Battery Voltage (V)"
chart_setAxis 1 "axpress" 1 "Pressure (hPa)"
// for demonstration purposes, add some data at fixed times
// First argument is NTP time value
chart_add 1725606094 3.8 1013
chart_add 1725616094 3.7 1011
chart_add 1725626094 3.7 1012
chart_add 1725636094 3.6 1015
chart_add 1725646094 3.5 1013
chart_add 1725656094 3.4 1014

Result:
Graph showing battery voltage and pressure over time


Sample chart 5 - third y axis
While not recommended, it's still possible to add a third unit axis. Here is a VCP (Voltage/Current/Power) graph:


// Sample 5 - try 3 axes
startDriver charts
// chart with max 16 samples, 3 variables and 3 separate vertical axes
chart_create 16 3 3
// set variables along with their axes
chart_setVar 0 "Voltage" "axvolt"
chart_setVar 1 "Current" "axcurr"
chart_setVar 2 "Power" "axpower"
// setup axes
// axis_index, name, flags, label
chart_setAxis 0 "axvolt" 0 "Voltage (V)"
chart_setAxis 1 "axcurr" 1 "Current (A)"
chart_setAxis 2 "axpower" 2 "Power (W)"
// for demonstration purposes, add some data at fixed times
// First argument is NTP time value
chart_add 1725606094 12 0.5 6
chart_add 1725616094 11.8 0.52 6.14
chart_add 1725626094 11.5 0.54 6.21
chart_add 1725636094 11.3 0.55 6.22
chart_add 1725646094 11.1 0.56 6.22
chart_add 1725656094 10.9 0.58 6.32

Result:
Chart with three y-axes showing voltage, current, and power.


Final sample - how to plot DHT11 measurements?
All samples so far had hardcoded time values, but it's also possible to get time from NTP. For this purpose, first we need to start NTP and wait for NTP connect:

startDriver NTP
waitFor NTPState 1

Then we can periodically call chart_addNow command, with, for example, given channel content:

// in a loop
again:
// This assumes that $CH1 is temperature_div10
// chart_addNow will take time from the NTP driver
chart_addNow $CH1*0.1
// every 10 seconds
delay_s 10
goto again

Alternatively, we can use repeating event for that - it's the same:

// every 10 seconds, -1 means infinite repeats
addRepeatingEvent 10 -1 chart_addNow $CH1*0.1

And then we can build upon that. Here is a full code for DHT11 demo:

// DHT11 setup
IndexRefreshInterval 100000
startDriver charts
startDriver NTP
waitFor NTPState 1
chart_create 48 2 2
// set variables along with their axes
chart_setVar 0 "Temperature" "axtemp"
chart_setVar 1 "Humidity" "axhum"
// setup axes
// axis_index, name, flags, label
chart_setAxis 0 "axtemp" 0 "Temperature (C)"
// flags 1 means this axis is on the right
chart_setAxis 1 "axhum" 1 "Humidity (%)"

// every 60 seconds, -1 means infinite repeats
// assumes that $CH1 is temperature div10 and $CH2 is humidity
addRepeatingEvent 60 -1 chart_addNow $CH1*0.1 $CH2

And here is sample output (from @divadiow , thank you for testing):
Temperature and humidity chart from DHT11 sensor
As you can see, our charts driver can work well with DHT11.


Remember that you can hover mouse over datapoint
If you are not sure what is the value of given datapoint, you can always hover mouse about it to get more details:
Chart of variables for DHT11 sensor with voltage, current, and power

Chart commands
Summing up, charts have the following commands:
CommandArgumentsDescription
chart_createsamplesCount variablesCount axesCountCreates a chart with a specified number of samples, variables, and axes.
chart_setVarindex varName axisNameAssociates a variable with a specific axis.
chart_setAxisaxisIndex axisName flags labelSets up an axis with a name, flags, and label. Currently flags can be 0 (left axis) or 1 (right axis)
chart_addntpTime var1 [var2 ...]Adds data to the chart with specified variables at a specific NTP time.
chart_addNowvar1 [var2 ...]Adds data to the chart using the current NTP time.

Of course, they are subject to change in the future, so you may want to check the latest docs here:
https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md


Planned features
This is a very early version. Some improvements are coming soon:
- soon it will be possible to specificy RGB color per variable
- currently OBK is using chart.js library from web, but it is planned to allow users to specify alternative chart.js path so they can fetch it from their own server
- persistent data storage (optimized to reduce flash wear) is also planned
You can also give your own feature suggestions and we will do our best to implement them!

Summing up
I think that having charts handled directly on device can be very useful, especially for people who do not want to set up their own Home Assistant instance. With our charts driver, you can have just a single IoT device in your house and still enjoy charts data. No Home Assistant, no external server, nothing else is needed! I hope some of you will find this little feature useful. Stay tuned, more updates coming soon.

About Author
p.kaczmarek2
p.kaczmarek2 wrote 14451 posts with rating 12431 , helped 650 times. Been with us since 2014 year.

Comments

divadiow 12 Sep 2024 17:26

following on from https://www.elektroda.com/rtvforum/viewtopic.php?p=21223955#21223955 elements as seen on BK-N with Charts driver: https://obrazki.elektroda.pl/5611199300_1726153956_thumb.jpg ... [Read more]

p.kaczmarek2 12 Sep 2024 17:40

The div called "state" should contain canvas and script elements which I marked on your Beken device screenshot: https://obrazki.elektroda.pl/5953903600_1726155244_thumb.jpg The following elements... [Read more]

divadiow 12 Sep 2024 21:11

free space seems OK. If you run that command on its own on command line you get a panic and reboot https://obrazki.elektroda.pl/4568243400_1726166653_thumb.jpg Added after 7 [minutes]: if... [Read more]

insmod 13 Sep 2024 09:30

chart_create 48 2 2 still panics, but you shouldn't use chart_setVar and chart_setAxis before chart_create. They don't have a null check, and so when they try to write, it will crash. It can be seen at... [Read more]

p.kaczmarek2 13 Sep 2024 09:39

I see, two of the functions were missing NULL checks, I've added them now in new commit. The only question is why chart_create panics? I've tried to check code with: _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF... [Read more]

insmod 13 Sep 2024 10:11

Done a little testing, using charts_create 10 1 1 If called a second time, without setvar/setaxis, it tries to free a null pointer I (174333) OpenBeken: s is not null I (174333)... [Read more]

p.kaczmarek2 13 Sep 2024 10:25

I see, my testing didn't cover this specific situation, but now I can reproduce it: https://obrazki.elektroda.pl/1690435200_1726215488_thumb.jpg Let me check... Added after 2 [minutes]: 0xcdcdcdcd... [Read more]

insmod 13 Sep 2024 10:36

Right now even chart_create 10 1 1 crashes with Load access fault, with MTVAL register pointing at 0x00000000. But, i have yet to apply latest patch. [Read more]

p.kaczmarek2 13 Sep 2024 10:40

I am unable to reproduce this issue, however I've tried only on Windows: https://obrazki.elektroda.pl/2712891300_1726216731_thumb.jpg I've also pushed a fix for a rare case when malloc fails during... [Read more]

insmod 13 Sep 2024 10:42

With last patch - creates ok, even chart_create 24 2 2, but as soon as i request main http page - it crashes with all set https://obrazki.elektroda.pl/6219982700_1726218343_thumb.jpg [Read more]

p.kaczmarek2 13 Sep 2024 10:59

But you didnt' set axes, right? I guess your platform doesn't like NULL in vsnprintf: https://obrazki.elektroda.pl/9717944100_1726217178_thumb.jpg On Windows, it's tolerated and does not crash.... [Read more]

insmod 13 Sep 2024 11:28

Without patch, just preconfigured axes/vars evaluating $CH0*0.1 isn't working, it just adds to chart as $CH0 IndexRefreshInterval 100000 startdriver aht2x 0 1 0 1 startDriver charts startDriver... [Read more]

p.kaczmarek2 13 Sep 2024 11:32

The following observation indicates that you may be missing ability to expand variables (or, whatever they are called). Do you have: #define ENABLE_EXPAND_CONSTANT 1 enabled for your platform? If... [Read more]

divadiow 14 Sep 2024 09:18

1344_merge_ff4d8fde47e8 with https://obrazki.elektroda.pl/2669193700_1726298087_thumb.jpg no crash now when running chart_create 96 4 3 manually. just some junk in log (but there's junk... [Read more]

max4elektroda 19 Sep 2024 18:09

Finally I had some time to check out this driver and I hope it's o.k. to give some feedback or proposals: At least for me the chart is never refreshed, to be exact, the graph is refreshed, but only... [Read more]

max4elektroda 21 Sep 2024 22:23

Tried to switch to a "separated" code for ring buffer - so it would be possible to use the same code for different cases. Up to now, int a 32bit integer - float is "simulated" as an integer multiplied... [Read more]

p.kaczmarek2 21 Sep 2024 22:36

Thank you, I think I can merge https://github.com/openshwprojects/OpenBK7231T_App/pull/1352 already but I'd need to have charts disabled in obk_config.h by default. I will comment futher when I get some... [Read more]

max4elektroda 22 Sep 2024 19:06

I just made another change to "move" the chart on the webpage - now it's "below" the "state"-div and will not be replaced on every load of "state". In https://github.com/openshwprojects/OpenBK7231T_App/pull/1358,... [Read more]

p.kaczmarek2 22 Sep 2024 21:37

Very nice, I think I can merge it today or tomorrow. Do I only need to merge this PR or any others as well? So the charts library works well with realtime refresh out of the box? [Read more]

FAQ

TL;DR: With 48 samples and 2 axes, OpenBeken can log history directly on-device; as one maintainer put it, "No Home Assistant, no external server" is needed for temperature, humidity, voltage, or power charts. This FAQ is for OpenBeken users who want local measurement history, setup examples, and fixes for crashes, refresh issues, and platform quirks. [#21223630]

Why it matters: It lets small IoT devices keep useful measurement history without adding Home Assistant, a database, or another always-on server.

Approach Extra infrastructure Where history lives Best for
OpenBeken charts driver None beyond the device and browser On the OBK device Small standalone setups
Home Assistant history Home Assistant instance and integration External system Larger automations and central dashboards

Key insight: The charts driver became practical after fixes for NULL checks, repeated chart_create, redraw flicker, and input validation. Once enabled for your platform, the core setup is simple: create the chart, map variables to axes, then add samples on a timer. [#21263018]

Quick Facts

  • The basic chart workflow has 5 steps: start the driver, create the chart, assign variables, configure axes, and add data samples. [#21223630]
  • A working DHT11 demo used 48 samples, 2 variables, 2 axes, and logged values every 60 seconds with chart_addNow. [#21223630]
  • The driver can plot mixed units on separate axes, including examples such as temperature (°C), humidity (%), battery voltage (V), pressure (hPa), current (A), and power (W). [#21223630]
  • One crash investigation showed about 60 kB free RAM on a BK7231 test device, so missing charts were not always a low-memory issue. [#21224054]
  • Long-run testing on W600 showed stable free memory around 30,848 bytes for hours, which suggests the chart buffer itself was not leaking over time. [#21244441]

How do I set up the OpenBeken charts driver in autoexec.bat to log temperature, humidity, voltage, or power history directly on the device?

Create the chart in autoexec.bat, then add samples on a timer. 1. Start charts and usually NTP. 2. Run chart_create samples vars axes, then chart_setVar and chart_setAxis. 3. Use addRepeatingEvent with chart_addNow or chart_add. A working DHT11 example used chart_create 48 2 2 and logged temperature plus humidity every 60 seconds. [#21223630]

What is the OpenBeken charts driver, and how is it different from using Home Assistant for measurement history?

It is an on-device charting feature that stores a rolling measurement history inside the OpenBeken device. "Charts driver" is a built-in OpenBeken component that renders measurement history in the device web UI, using configurable variables, axes, and a looped sample buffer. Unlike Home Assistant, it needs no external server. The thread’s main use case was a single IoT device showing its own temperature, humidity, voltage, or power history locally. [#21223630]

Why does chart_create panic or reboot some OpenBeken builds, and what fixes were discussed for NULL checks, uninitialized memory, and malloc failures?

The panics came from several code bugs, not one cause. The thread identified missing NULL checks in chart_setVar and chart_setAxis, uninitialized pointers after allocation, repeated chart_create freeing garbage data, and a rare malloc-failure path. One ESP build showed CORRUPT HEAP and rebooted. Later patches added NULL checks, zero-initialization, repeated-create fixes, and handling for malloc failure. [#21224739]

What is ENABLE_DRIVER_CHARTS in obk_config.h, and how do I enable the charts driver for my specific OpenBeken platform?

ENABLE_DRIVER_CHARTS is the build flag that includes the charts driver for a given platform. If startDriver charts says the driver is unknown, enable #define ENABLE_DRIVER_CHARTS 1 in that platform’s obk_config.h, then build that target. The original guide said to set it in the chosen platform config and use the custom online build flow if your binary lacks charts. [#21223630]

How can I use chart_addNow with NTP to plot live DHT11, AHT20, BMP280, or power-monitor readings in OpenBeken?

Start NTP, wait until time sync is ready, then schedule chart_addNow with your live variables. The DHT11 example used startDriver NTP, waitFor NTPState 1, chart_create 48 2 2, and addRepeatingEvent 60 -1 chart_addNow $CH1*0.1 $CH2. A BMP280 plus AHT20 test used chart_create 96 4 3 and logged four channels every 900 seconds. The same pattern also works for power-monitor variables such as $voltage and $power. [#21225816]

Why does $CH0*0.1 or $CH1*0.1 fail to evaluate on some ESP32, W600, or other OpenBeken builds, and what does ENABLE_EXPAND_CONSTANT do?

It fails when the build cannot expand expressions inside command arguments. On affected builds, chart_addNow $CH0*0.1 $CH1 can pass the raw token instead of the calculated value, so temperature appears unscaled. The thread pointed to #define ENABLE_EXPAND_CONSTANT 1 as the needed feature flag. An ESP fork lacking that define was the suspected reason expression expansion did not work there. [#21224804]

What causes waitFor NTPState 1 to return 'command not found' on some platforms like W600, and how can I work around missing waitFor support?

That error means the platform build does not include the waitFor command parser. A W600 test printed waitFor NOT found, then still created a chart, but expression handling also looked incomplete. The practical workaround is to skip waitFor and either use fixed timestamps with chart_add, or delay charting until time becomes available by another mechanism. One helper command used chart_add 1727438906+$uptime ... to emulate running time without NTP. [#21241366]

How do I chart $power and $voltage every 5 seconds on a BK7231N smart plug with BL0937 in OpenBeken?

Use NTP, create a 2-variable chart, then sample $voltage and $power every 5 seconds. A confirmed working setup on a BK7231N smart plug with BL0937 used chart_create 48 2 2, mapped Voltage and Power to separate axes, and finished with addRepeatingEvent 5 -1 chart_addNow $voltage $power. The user reported it worked after enabling a build that included the charts driver. [#21254467]

Why was the chart not refreshing live in Firefox or Chromium, and how did moving the chart below the state div reduce flicker and page focus issues?

The page kept redrawing the chart inside the state div during status refreshes. That reloaded script content, caused flicker, and could pull browser focus back to the chart. A later PR moved the chart below the state div and changed redraw behavior so updated data refreshed smoothly. Users then reported the graph no longer flickered and the page stopped jumping back while they viewed controls below. [#21237266]

What is a ring buffer in the context of the OpenBeken charts driver, and how does buffer wrap-around affect sample order and long-term logging?

It is the fixed-size loop that stores the newest N samples and overwrites the oldest ones when full. "Ring buffer" is a circular data structure that reuses the same memory block, keeps a rolling history window, and wraps from the end back to the beginning instead of growing indefinitely. In practice, a 30-sample test should still show correct order after 31, then 60 cycles, if wrap-around logic is correct. [#21239907]

OpenBeken charts on-device vs Home Assistant history graphs — which approach makes more sense for a small standalone IoT setup?

OpenBeken charts make more sense when you want one device to keep its own history with no extra infrastructure. The thread explicitly positioned the driver for users who do not want to set up Home Assistant. If you only need local graphs for temperature, humidity, voltage, or power on a single device, on-device charts are simpler. Use Home Assistant when you want centralized dashboards across many devices. [#21223630]

How can I test whether the charts driver is stable across platforms like BK7231N, BL602, W600, W800, XR809, ESP32, and the Windows simulator?

Run the same small chart script, watch memory, then test wrap-around and live refresh. The thread used manual chart_create checks, overnight runs, repeated sample insertion, and platform-specific builds on BL602, W600, W800, XR809, ESP32, and the Windows simulator. One maintainer specifically recommended a small buffer, such as 30 samples, then verifying order after 31 and 60 cycles to confirm wrap-around behavior. [#21239907]

What should I check when charts are missing from the OpenBeken web UI even though startDriver charts appears to run?

First verify that the build actually contains the charts driver, then confirm chart_create really ran. Missing UI output can happen when the driver is running but no g_chart object exists, so the HTML canvas and script never get generated. The thread also suggested checking whether autoexec.bat executed correctly, whether whitespace broke parsing, and whether free memory was still healthy; one example showed about 60 kB free. [#21224054]

How do I add charts support to platforms that use DISABLE_ALL_DRIVERS or require manual Makefile entries, such as W800, LN882H, W600, or XR809?

You must both compile drv_charts.c and allow driver startup hooks. For reduced-driver platforms, the thread proposed OBK_ALLOW_DRIVERS_START 1 together with code paths that still call DRV_Generic_Init, DRV_OnEverySecond, and DRV_AppendInformationToHTTPIndexPage. For SDKs with explicit source lists, such as W800 or XR809, drv_charts.c also had to be added manually to the Makefile source entries. [#21240972]

How could a chart_getVar diff-style feature work in OpenBeken for showing changes between the latest and previous energy or sensor values?

The suggested design was to let chart_getVar return the delta against older samples. The proposal used chart_getVar 0 -1 for the difference to the previous value and chart_getVar 0 -2 for two steps back. In the example series 500, 450, 300, the newest point would report diffs of 50 and 200. The maintainer said the idea was interesting and invited a pull request. [#21440659]
Generated by the language model.
%}