Graph Widget
The Graph widget renders a line or area chart from data stored in the VWire time-series database. You can view historical ranges and enable live streaming to watch values arrive in real time.
Default size: 4 × 3 grid cells
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
chartType | line | area | line | Chart rendering style |
color | hex color | #6366F1 | Line / fill color |
timeRange | 1h | 6h | 24h | 7d | 30d | 1h | Default historical window |
liveUpdate | boolean | true | Append new values without reload |
yMin | number | auto | auto | Y-axis minimum |
yMax | number | auto | auto | Y-axis maximum |
| Device | device | — | The device to read from |
| Pin | V0–V255 | — | The virtual pin to chart |
| Label | string | — | Widget label |
Firmware example
void loop() {
Vwire.run();
float temp = dht.readTemperature();
float hum = dht.readHumidity();
if (!isnan(temp)) Vwire.virtualSend(V0, temp);
if (!isnan(hum)) Vwire.virtualSend(V1, hum);
delay(10000); // 10 s resolution for historical charts
}
Data retention
VWire automatically downsamples data as it ages:
| Age | Resolution |
|---|---|
| < 24 h | Raw (every push) |
| 1–7 d | 1-minute averages |
| 7–30 d | 5-minute averages |
| > 30 d | 1-hour averages |
Push data at whatever rate makes sense for real-time, and let VWire handle long-term storage automatically.
Multi-series graphs
Overlay multiple pins on the same graph:
- Add a Graph widget and configure the primary pin.
- In Widget Settings, click + Add Series.
- Pick a second device + pin and an accent color.
Each series gets its own color and can have an independent Y-axis.
Tips
Smooth curves
Push updates every 5–30 seconds for smooth temperature/humidity graphs. Pushing every 100 ms will work but will generate a lot of data.
Y-axis auto-scale
Leave yMin/yMax as auto for self-scaling, or lock them to avoid jarring rescales on minor fluctuations.