color

sets the color of the bar that shows the value

string|function color;

Example

webix.ui({
    view:"bullet", 
    id:"b1",
    color:"#ffffff"
});


Default value:

"#394646"

Related samples

Details

You can set a static color for the bar as shown in the above example. Alternatively, you can make the bar change color depending on the value. Define color as a function:

webix.ui({
    view:"bullet",
    id:"b2",
    value:40,
    stroke:16,
    color:(v) => {
        if (v < 30) return "red";
        if (v < 60) return "gold";
        return "green";
    }
});

The function receives one parameter - the current value of the Bullet graph.

See also
  • Articles
  • Back to top