Opacity vs day

i try to make a day appear in black if it is the actual day, and gray if it is not. Like Tuesday will be full opacity black when it is tuesday, and gray (50% opacity) the other day. So i try text and put 100+[DAY_WEEK] <> 2? 0: -100 in tag opacity, but it do not work, so i try with “short text” complication, nothing work, i try with date, still nothing.

Can you tell me what i do wrong?

Thanks

Not equal is written as “! =”.

Correct expression:
100+[DAY_WEEK] != 2? 0: -100

1 Like

Tag for day of week returns values like 1(Sunday) - 7(Saturday). So for tuesday it would return 3.
I would try to set opacity like this
50+[DAY_WEEK]==3?50:0

3 Likes

i just forget to say a little thing, i would like to have the day kind of static .
like : MON TUE WED THU FRI SAT SUN on one line. i could put text, but it won’t follow the language.
i try to substract the variable [DAY_WEEK_S] and add 1 for Sunday, or 2 for Monday, but does not work (like [DAY_WEEK_S] - [DAY_WEEK_S] +2). So if it is monday, MON will be black and the rest of the line will be gray, and on tuesday, TUE will be black and the rest of the line gray etc…

Unfortunately WFS does not provide any easy way to make whole week days abbreviations localized.
If one language at time is OK for you, check attached example. Dont extract, just rename from .zip to .wfs
Day – kópia.zip (170.9 KB)

3 Likes

ok i understand, i will take you example, that is exactly what i need.

Thank you

Hello Tremal 832

The suggestion by peter works. You can use 7 linear progressive bars aligned in a straight line and use the same expression on the color tag. I wrote short form of all the days on the progressive bar so that the color get highlighted for that particular day. The below expression works. If it is Sunday, then the color of the progressive bar goes to 100 from 20.
[DAY_WEEK]==1?100:0

2 Likes