Skip to main content

Sparkline Widget

πŸ‘ Display

The Sparkline widget renders a compact line or bar chart of recent values from a virtual pin β€” no axes, no labels, just the trend. Ideal for placing a quick visual indicator next to a Value Display without taking up a lot of space.

Default size: 2 Γ— 2 grid cells


Configuration​

PropertyTypeDefaultDescription
pointsnumber20Number of data points shown
chartTypeline | barlineMini-chart style
colorhex color#6366F1Line / bar color
Devicedeviceβ€”The device to read from
PinV0–V255β€”The virtual pin to chart
Labelstringβ€”Widget label

Firmware example​

void loop() {
Vwire.run();

float cpu = getCPULoad(); // 0–100%
Vwire.virtualSend(V0, cpu);

delay(5000); // 5 s β†’ 20 points = last 1 min 40 s of trend
}

Pairing with Value Display​

A common combination:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Value Displayβ”‚ Sparkline β”‚
β”‚ 23.5 Β°C β”‚ ~~~\/~~~ β”‚
β”‚ β”‚ (last 20g) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
2Γ—2, pin V0 2Γ—2, pin V0

Both widgets bind to the same device and pin. The Value Display shows the current number; the Sparkline shows the recent trend.


Difference from Graph​

| Feature | Sparkline | Graph | |---------|-----------|----- -| | Size | 2Γ—2 compact | 4Γ—3 large | | Axes / labels | None | Full with time axis | | Historical range | Last N pushes | Configurable (1h–30d) | | Use | Quick trend | Detailed analysis |