Change Color of Progress bar depending on value

Dear b&r team.
I tried to configure the progress bar like the control in VC4 (i guess it was bargraph)
I want to change the color in dependency of the connected value.
For Example:
from 0 to 10%: red
from 10 to 50%: orange
from 50 to 100% green. → like in VC4
Can i do it by using events? if yes how i need to configure it.
i use AS 4.10 and mappview 5.24

Hello,

I could not find a property on the progress bar widget to accomplish that natively.

Using the property style as a binding could be an option.
Using an event binding would be possible, e.g reacting on the values changed and then using the SetStyle action for the progress bar.
In any case the style has to be defined in the style sheet to be used in (event) binding.

I did not test this yet, please feel free.

Best regards
Fabian

1 Like

Hello,

Its possible using a linear gradient. Might only be supported in AS6 or 6.1.

If you upgrade you’ll get that and a few more nice features. :slight_smile:

Im AS4 you can use the paper widget and build a nice fully loaded progress bar and cover it with another element. Then you can transform the overlaying element to reveal it gradually dependent on percentage loaded.

I recommend you to find some CC-licensed ready made SVG for progress bar and just edit it for your needs in inkscape.

BR
Carl