Grey out data points if no connection
Could you suggest how to grey out or change a color of data points in dashboards and watch lists when there is no connection with data source?
Jared Wiltshire last edited by
@dovydasz If the data point or data source is disabled it will have a red hash pattern placed over it by a CSS style. Do you want something like this? The data point value will display a little warning icon placed next to it if there are any events but I don't think it puts a CSS class on the point value for styling, I can look into adding this.
BG last edited by BG
I have a way of doing this in Mango 2.8 and DGlux. It does not apply to Mango 3 but I am sure someone could script this into a data point and use it like I have.
I have a numeric data point in the meta data source called time_diff. The data point has the following script using the timestamp of incoming data:
var time = raw.time;
var d = new Date();
var now = d.getTime();
var diff = (now-time) / 1000;
if (diff < 3600) return 1; return 0; //1 is good
I then use the result to change a colour setting in DGlux and to trigger an event for a "No Data" alarm
I am still getting to grips with Mango 3 but I am sure this could be used to grey out an indicator or gauge in the dashboard.