Working with the ruby gem Dashing making dashboards. I have multiple number widgets and I'm trying to see if there is a way to move the widgets based on the value. The idea is having the highest number values first. My thoughts are if it is possible maybe it could be done with JS on the dashboards erb file.
Here is an example of html rendered:
<h2 class="value" data-bind="current | prettyNumber | prepend prefix | append suffix">128,879</h2>
I'm not sure with the send_events that dashing uses or gridster if JS would work to sort my widgets by value.
The other thought is when you manually change the layout you get the "save this layout" and the following:
<script type='text/javascript'>
$(function() {
Dashing.cycleGridsterLayout('[[{"col":4,"row":1,"size_x":1,"size_y":1},{"col":5,"row":1,"size_x":1,"size_y":1}]]')
</script>
Hoping there might be a simple way to do this. Appreciate any help or further reading on this.