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.

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.

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:

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!!!

Best Regards 


How about having a condition with 3 results? for example, i want to set the style with red, blue and white?


Hi Nhorwin,

Given this is on topic, I'll just answer it here, but in the future please refrain from waking up old threads from 3 years ago ;) It is best to just post a new question.

Why not chain two If() functions? For instance, if you want that behaviour on text color, assigning something like this to the style extended property would do the trick, no?

"color: " + If(condition1, "red", If(condition2, "blue", "white")) + ";"

Hope this helps!