-
-
Notifications
You must be signed in to change notification settings - Fork 14
Gauges
In version 3.3.0, a new feature was introduced: Gauge charts. They can be shown on the current, week, month and year pages.Gauges will be updated if MQTT is enabled.
The gauge charts are in a experimental state, please feel free to give feedback or report any issue you may encounter!
Gauges are configured in the [DisplayOptions][[Gauges]]
section of the skin.conf
file.
gauges_display
- Only used with the alternative layout. Possible values are before
and after
. If set to before
, the gauges will be shown before the state-tiles. If set to after
, the gauges will be shown after the state-tiles. Default is before
.
gauges_size
Possible otions are small
, medium
and large
. Default is medium
.
Each gauge has several options available:
mode
- One of invert
or normal
. Normal will show the color schema between the current min and the max values. Invert will show the color schema across the whole gauge and will darken out values outside of the current min/max range. Default is normal
.
`normal` | `invert` |
---|---|
|
|
color_schema
- The color schema to use. Any of https://github.com/d3/d3-scale-chromatic, e.g. interpolateRdBu
, interpolateSpectral
, interpolateBlues
or interpolateInferno
.
invert_color_schema
- If set to True
, the color schema will be inverted. So for for interpolateRdBu
, which would be normally from red to blue, it would be from blue to red.
show_min_max
- If set to 1
, the min and max values will be shown on the gauge. Default is 1
.
tick_number
- The number of ticks to show on the gauge. Default is 7.
arc
- The arc of the gauge. Default is 1.0. Values are from 0.1 (very small section) to 2.0 (full circle).
For windDir
, the arc
option could be 2.0, which would render a full-circle-chart.
[[[[windDir]]]]
arc = 2
min = 0
max = 360
would result in a gauge like that:
offset
- The scale offset. Default is 20. Example outTemp
: the min observed outTemp
was 3.7°C, the max observed outTemp
was 12.2°C. The scale would be from -16.3°C (3.7 - 20) to 32.2°C (12.2 + 20).
min
- If you do not want use a variable offset value for the scale, you can set a static minimum value for the scale here.
max
- Same as min, but for the upper boundig of the gauge.
hide_tick_unit
- If set to 1
, the tick legend will be hidden. Default is False
.
Some notes to the windDir
gauge: If you have diagram_tile_winddir_ordinal
set to True
in skin.conf, the windDir gauge will use ordinate names (N,S,W,E,...) for the labels and values. It's best to combine this with arc = 2
to get a full circle chart and a tick_number
of 9:
[[[[windDir]]]]
arc = 2
min = 0
max = 360
tick_number = 9
show_min_max = 0
Gauges are available for the index, week, month and year pages. To enable them, you need to add the observations you want to show, under the appropiate key, like:
[[Gauges]]
[[day]]
[[[[outTemp]]]]
min = -20
max = 40
[[[[barometer]]]]
offset = 3
[[[[windSpeed]]]]
min = 0
[[[[windDir]]]]
arc = 2
min = 0
max = 360
[[week]]
[[[[outTemp]]]]
[[month]]
[[[[outTemp]]]]
[[year]]
[[[[outTemp]]]]
This would show a gauge for outTemp
on the week, month and year pages, and a gauge for outTemp
, barometer
, windSpeed
and windDir
on the day page.
As written at the beginning, gauges are in a very early state. There are a few limitiations and known bugs:
- Gauge charts are only working with observations that use an aggregation of average. For "sum observations", like rain or windRun, they will show the average value of the observation, not the sum.
- Gauge charts are not yet working on the statistics page.
If you want to get theses things addressed, please feel free to create a discussion or issue on GitHub to draw my attention on it.