Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart Line to change colour

Hi,

I can have the following chart:

Capture.PNG

From 14.00 hours I want the blue line to go white.

I've tried to write the following expression for the Background Colour, but it doesnt change anything.

if (Hour>'14', RGB (255,255,255), RGB(0,123,255))

Any ideas folks?

Thanks.

10 Replies
MK_QSL
MVP
MVP

May be try as below

if (Hour>14, RGB (255,255,255), RGB(0,123,255))


or what is the format of your Hour?

Anonymous
Not applicable
Author

Syntax looks okay, the only thing you need to check the format compatibility.

Make sure Format of Hour and 14 should be same

Not applicable
Author

How can I get the format to be the same?

Thanks

Not applicable
Author

Hi deep,

your syntax is correct,

if possible to share your date field values

rubenmarin

Hi, from the straigth line after '14' seems that expression is full accumulated and there is no data for hour>14 so it keeps the last value, maybe using:

if (Hour>14 or IsNull(Hour), RGB (255,255,255), RGB(0,123,255))

Not applicable
Author

No it didnt work

krishna20
Specialist II
Specialist II

Hi,

Try like this ,

Expand your expression ->Select Background Color->if (Hour>=14, RGB (255,255,255), RGB(0,123,255)).

I tried in my app as per my requirement. Please you try with your values.

Edited :  My experession is like this

=if((Sum({<Category_ID={'Cat_002'}>}Value))>=750,RGB(181,230,89),Blue()).

Comm_196300.png

MK_QSL
MVP
MVP

Define vHour as

=Time#('13','hh')*24

Dimension

=Floor(Frac([Arrival DateTime])*24)

Use below expression for color

IF(Floor(Frac([Arrival DateTime])*24)>=vHour,White(),Green())

Change Green() to whatever colour want.

MarcoWedel

‌maybe helpful

Re: Coloring line chart by two dimension

regards

Marco