Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
d_petrov
Contributor III
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
m_woolf
Master II
Master II

You might try setting the line color to transparent

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

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
Contributor III
Contributor III
Author

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
Partner - Specialist III
Partner - Specialist III

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
Partner - Specialist III
Partner - Specialist III

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
Contributor III
Contributor III
Author

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
Partner - Specialist III
Partner - Specialist III

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?

ddking
Partner - Contributor II
Partner - Contributor II

Try this (look attached file)

DottedLine.PNG