Not sure if it's possible...Thanks...
In what way? what do you want the click to do?
The gauge has no click event so no output. It may be possible to add one by targeting the css div via a template but I haven’t tried
OK, I understand.... It's not worth jumping through hoops for this functionality. I thought it could be something simple which is why I asked about it...
Adding a button is the simple way
True, but it takes up vertical space, which is critical in my app. I think clicking on the Gauge itself is more intuitive...
Intuitive? How would anyone know to click on it ?
Funny you mentioned that.... So, this morning I was showing the dashboard to some potential users. When they saw the gauges, they said "if I click on the gauge would it drill down to the settings?"
Honestly, that never even crossed my mind until it was mentioned to me... Go figure...
Not difficult to add a click event handler to anything. Since Dashboard includes JQuery in addition to Angular.
You can feed in a custom script using a Dashboard Template node.
In Angular, you can use the
ng-click attribute to add a handler so you don't even need JQuery, just depends what you are more comfortable with. JQuery is easiest to add programmatically I think - but then I'm not a fan of Angular.
You could add the click event to the whole card or just to the gauge itself
Above, you can see an example of a gauge - you can see that you have a class you could attach to though remember that would add a click handler to all gauges in the Dashboard, you can tell which one it is within your code.
The space conservation was one of reasons why I did the https://flows.nodered.org/node/node-red-contrib-ui-level node. All features what is given by regular gauge can be fitted into one unit height. Try it out.
Ui-level does not provide click functionality but if you can free up some space, so you can then add buttons if you like.
I agree that there is obvious functionality for being able to click on a gauge , to be able to "drill down" into the underlying data. First level of which could be a time series graph of the data being fed to the gauge, followed by raw data points in said time series. This issue as well as being able to customise the look and feel of gauges is one of the limiting factors in the existing node-red ui dashboard.
More than happy to consider a pull request for some added functionality, provided it doesn’t break existing, and doesn’t add too many options that would confuse beginners.
Other gauge types can be provided by 3rd party widgets so feel free to create some.
Well, from my original post, I thought it might be a "nice feature to have".
That said, I think I can get by without it for now.
However, I wouldn't mind having that functionality because I could think of some decent use-cases for it...