Calculated pen expressions
+ Calculated pen in the side panel adds a pen computed from others. Pick
Input A (and B, for a sum or difference), each shown with its whole path, and a
calculation: the editor shows a worked example of it in your pens' names and
unit. Or write an expression (How to write an expression lists what it
takes). Pens are referred to in braces by their id
({p1}, shown in the pen list) or by name ({Line 1 outlet flow}). When the pen
is added, names become the ids of the pens they name then ({#p1}), so renaming
or removing a pen never makes the calculation use another one: a removed input is
reported. A name two pens share is refused.
| Expression | Result |
|---|---|
derivative({p1}) |
Change per second; derivative({p1}, 3600) per hour |
delta({p1}) |
Change since the previous point |
offset({p1}, -2.5), scale({p1}, 1000) |
Shifted or scaled |
sum({p1}, {p2}), avg(...), min(...), max(...) |
Combined at every timestamp of any input, each holding its last value |
({p1} - {p2}) / {p2} * 100 |
Any arithmetic with + - * / ^, abs() |
Calculated pens are evaluated in the browser, on the data on screen and on the raw data of an export.
Copied from the section "Calculated pens" of the README when the site is built. Source: README.md.