This widget is based on the standard Dashing Number widget and the Hotness Widget created by Rowanu.
With this widget, you can display the standard number widget with a color that will respond on the evolution (the difference displayed between last and current value that is displayed on the standard number widget)
It can be useful to display colors based on the evolution of the number widget : if increasing is "bad" then it will display red. If you refer to the thumbnail, you'll see an example of application around a server pool.
Copy
- hotnumber.coffee
- hotnumber.html
- hotnumber.scss
in a "hotnumber" folder in your dashing widget directory.
Its use is very close to the standard Number widget : you simply have to add two attributes in your UI
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. Remember that you can set a negative data-cool value (-1 will make the widget go green if all is ok)
- data-warm : all values greater than this will display the "hot" colour. Use it to symbolize the "bad" range of values.
Examples :
For Dashing-js
li(data-row='1', data-col='1', data-sizex='1', data-sizey='1')
div(data-id='valuation', data-view='Hotnumber', data-title='Operation costs', data-moreinfo='Daily evolution', data-suffix='€', data-cool="-50", data-warm="50")
For regular Dashing
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="serverstatus" data-view="Hotnumber" data-title='Operation costs' data-moreinfo='Daily evolution' data-suffix='€' data-cool="-50" data-warm="50"></div>
</li>
Same data structure as the standard Number widget.
Licenced under the Creative Commons Attribution 4.0