Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Conditional coloring to line chart based on reference line in line chart

Hi,

I have a line chart where I am using reference line. what I need to do in chart is Lines which are above reference 0 should be red & lines below should be green. I am attaching a test report so you might get a better idea.

Thanks

1 Solution

Accepted Solutions
Highlighted
14 Replies
Highlighted
Master II
Master II

Hi.

You can't do it directly.

The line and color belongs to the data point (the start of the segment).

The only way is to calculate the middles and add zero point appropriately.

The solution depends on weather you want to use continuous x-axis or not.

Highlighted
Not applicable

Hi,

Thanks for your reply... Adding zero points will be like adding dummy records which is not a comfortable way to have.

Can we have background of chart like background above 0 will be of red color & below it can be green? Color doesn't matters just distinguishing areas above & below reference lines needed. Any help?

Thanks

Highlighted
Not applicable

Hi,

You can do something like this

Please find the attached file...

Highlighted
Not applicable

Or, maybe like this...

Highlighted
Not applicable

Hi,

Thanks but position of reference line will chages depending on the data.

Ex: depends on customer filter data changes and so position of reference line changes.  So I can't go with putting text boxes on background.. Any other workaround?

Thanks

Highlighted
Master II
Master II

Hi.

You can try to use a background image with two areas of equal height.

Then set the expressions for Min/Max properly. They should be equal modulo and change dynamically according to the data selected.

Highlighted
Not applicable

Hi,

Can you please give a sample report ?..  it will give me better understanding.

Thanks

Highlighted
Master II
Master II

Hi.

Something like this.

Notice expressions for min and max.

Highlighted
Not applicable


Hi,

This solution is good when reference axis is not moving .. but with my data reference axis is moving... sometimes if there are all -ve values then reference line appear at top with no +ve values on y-axis.. so this solution has limited scope in my scenario.. Any other suggestion?