This widget is based on the standard Dashing Meter widget and the Hotness Widget created by Rowanu.
Use it as the standard Meter widget and add the following attributes in your dashboard elements declaration :
- data-cool : all values below this will display the "cool" colour. Use it to symbolize the "good" range of values.
- data-warm : all values greater than this will display the "hot" colour. Use it to symbolize the "bad" range of values.
And more, you can use
- data-suffix
- data-prefix
to postpend or prepend a string to your value. Useful for metrics with an unit.
Copy
- hotmeter.coffee
- hotmeter.html
- hotmeter.scss
in a "hotmeter" folder in your dashing widget directory.
To use it :
ruby dashing:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="synergy" data-view="Hotmeter" data-title='my title' data-min='0' data-max='100' data-moreinfo="more info" data-cool="20" data-warm="90" data-suffix="%"></div>
</li>
dashing-js:
li(data-row='1', data-col='5', data-sizex='1', data-sizey='1')
div(data-id='synergy', data-view='Hotmeter', data-title='my title', data-min='0', data-max='100', data-moreinfo="more info", data-cool="20", data-warm="90", data-suffix="%")
Licenced under the Creative Commons Attribution 4.0
Very nice!
Thanks