defines the custom color for the Gage widget
webix.ui({
view: "gage",
minRange: 0,
maxRange: 100,
color:"green"
});
You can specify one fixed color (string) for the control, as in the example above. Or you can set different colors for particular ranges of values with the help of a function:
var color = function(val){
if (val < 40) return "green";
if (val < 80) return "orange";
return "red";
};
webix.ui({
view: "gage",
minRange: 0,
maxRange: 100,
color:color,
label: "Pressure"
});