Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Eddie1
Contributor
Contributor

Custom Coloring on Vizlib Gantt Chart

Hi, I'm doing a project on Qlik Sense that includes using the Vizlib Gantt chart. I would like to be able to color the event bars on the gantt chart by expression, but the expression editor does not work with anything I put in.

Let's say I want to color with a simple 'if' statement. I put the following in the expression editor under 'Event Bar Styling':

if(Name='Martha', blue(), brown())

Everthing turns out brown despite 'Martha' appearing in Name column many times. Any ideas on how to make this work?

Labels (1)
1 Reply
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Eddie,

If everything turns out brown, it tells me that the formula works, however the IF condition never renders True. It could happen, for example, if there are multiple values of the field Name for each bar in your bar chart. Just for example, if the bar chart is by Date, and there are multiple Names for each date. Another reason could be a syntax error in the condition.

If you could create a little sample app that demonstrates the problem, then I could look into it.

Cheers,