Charts: Highlight/change color of specific bar

Hi

I would like to highlight/change the color of a bar when a certain criterion is met.
Is there any way to do this?
I managed to get the selected bar ID but I don’t know what to do then.
Any help is appreciated! :slight_smile:

http://webix.com/snippet/aeccae25

Hi Dillinger,

Colors of chart bars are defined via its color property that can be either a template or a function. So you can initially color the bars according to item properties.

color:function(obj){
    if(obj.correct==="true")
         return "green";
    else return "red";
}

If you want to change item color on some event you should update the necessary item. Please, check the following code snippet http://webix.com/snippet/3c85967a