Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
d_petrov
New Contributor III

How to receive line interruption in chart where the value is 0

Hello,

Is it possible to interrupt the line in a Line Chart when we have 0 values for Y-axis?

I want to get rid of the line , which is marked with X  (see the screenshot).

Best Regards,

Drago

8 Replies
mwoolf
Honored Contributor II

Re: How to receive line interruption in chart where the value is 0

You might try setting the line color to transparent

MindaugasBacius
Valued Contributor III

Re: How to receive line interruption in chart where the value is 0

Chart Properties -> Expressions -> Click + of the expression -> Click the Background Color option-> and define color in Definition text box on the right side like:
If([YOUR EXPRESSION] > 0, black(), white())
d_petrov
New Contributor III

Re: How to receive line interruption in chart where the value is 0

Hello,

Thanks for the answer!

I transformed the chart into a straight table and looks like the whole August is missing. However, I have all days values in some kind of calendar, so the Y-axis value appears to be not 0, but NULL.
I tried to put Expression value to : If(ISNULL([Expression]), 0 , [Expression]) to get the 0 value and use your expression, 

but without success. Any ideas?

 

MindaugasBacius
Valued Contributor III

Re: How to receive line interruption in chart where the value is 0

You should unselect in Chart properties > Presentations > Suppress Zero values or simple change to Line chart to see if it works.
Or try something like might work to look if this works:
If([Expression] > 0.25, red() , green())
MindaugasBacius
Valued Contributor III

Re: How to receive line interruption in chart where the value is 0

You should come up with this result:

Screenshot_2.jpg

In your case when the value is null the should be white().

Just use trail - error method and I am sure you'll get the right result. Or you could provide sample qvw file for community 🙂

d_petrov
New Contributor III

Re: How to receive line interruption in chart where the value is 0

Well 🙂

we are one step closer to the end.
I succeeded to make the line where the value is null in ARGB(0,0,0,0),

but the legend color disappeared too if there are line interruptions.
I know I can make separate labels and put the below the chart, but is there any way to somehow make the legend with permanent colors and not affected by the expression background? 

Thanks and regards,

Drago

MindaugasBacius
Valued Contributor III

Re: How to receive line interruption in chart where the value is 0

The legend is shown in case there are more than one expression.

I would suggest creating one more expression but instead of line chart use Text as pop-up:

Screenshot_1.jpgDid it help?

Partner
Partner

Re: How to receive line interruption in chart where the value is 0

Try this (look attached file)

DottedLine.PNG