Sparkline Widget Examples
Example 1: BTC Price Trend (Single Series)
Datasource Setup
- Add datasource.
- Set
Type = HTTP. - Set
Title = btcTicker. - Set
URL = https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd. - Set
Refresh = 15seconds. - Save.
Widget Setup
- Add widget.
- Set
Type = Sparkline. - Set
Title = BTC Trend. - Set
Header Text = BTC/USD. - Set
History Length = 120. - Set
Line Width = 2. - Set
Scale Mode = Auto. - Set
Value Path = btcTicker.bitcoin.usd. - Leave
Series Pathsempty. - Save.
Expected output: one trend line showing recent BTC movement.
Example 2: Temperature + Wind (Multi-Series)
Datasource Setup
- Add datasource.
- Set
Type = HTTP. - Set
Title = weatherTrend. - Set
URL = https://api.open-meteo.com/v1/forecast?latitude=40.7128&longitude=-74.0060¤t_weather=true. - Set
Refresh = 30seconds. - Save.
Widget Setup
- Add widget.
- Set
Type = Sparkline. - Set
Title = NYC Weather Trend. - Set
Header Text = NYC. - Set
History Length = 100. - Set
Include Legend = true. - Set
Legend Labels = Temp (C),Wind (km/h). - Set
Series Paths = weatherTrend.current_weather.temperature,weatherTrend.current_weather.windspeed. - Set
Scale Mode = Auto. - Save.
Expected output: two colored trend lines (temperature and wind speed).