color

defines the custom color for the Gage widget

string|function color;

Example

webix.ui({
    view: "gage", 
    minRange: 0,
    maxRange: 100,
    color:"green"
});

Related samples

Details

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"
});
See also
  • Articles
  • Back to top
    If you have not checked yet, be sure to visit site of our main product Webix mvc library and page of gage widget product.