CSS color dynamic

CSS color dynamic

  
Hi Comunity...

i have a dashboard with some values of expected visitors and real visitors, and then a calculate the difference.
If the Value is positive apply the css ie color green, if negative color red. How to implement this?

Best regards
Andrew Tabata
Hi Andrew,

You can add your conditional CSS in the widgets' extended properties part menu. Below there's a small example of how you can achieve it:



Hope this solves your problem.

Let me know if you have further questions.

Regards,
Ricardo Alves
Hi Andrew,

You can apply conditional formatting in the extended properties of the widget. For property "style" you can write some condition in it's value applying functions as If() or any other and refresh whenever the calculated difference changes.
The same principle applies to other extended properties you might want to use.
Hi again...
I forgot to mention that i knew in the extended properties to apply conditions, but therefore i have to click each cell and apply that style.there isn't any method more generic to do that is there? Like ie, apply a CSS generic to adopt that color, instead of cliking and applying each cell that style in extended properties.

 
Andrew,
It depends on what exactly you want to change - I mean, as an example, you can apply style at a row level.

Another idea is using a text variable, that you use in the extended properties and set elsewhere, instead of writing everytime "blue", "white" etc...


Hi Andrew,

Not really sure if understand your scenario, but tou can alway use a class extended propery in the row e.g.


And then in the row extended properties:


Hi,
Since it was calculated values i had to do cell by cell, thanks Ricardo Alves, Tiago Neves and Tiago Simões for the help.
Really Aprecciated!!!
Ty

Best Regards 
Andrew