Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kmstephenson
Creator
Creator

conditionally hide/show line on chart based on x-value

Hi All,

I would like to only show the line on a combo chart for x-values -12 to -1, and subsequently from 1 to 12. I do not want a line from -1 to 1. How can I do this? The chart is technically not continuous because I have no 0 values, but I am setting the x-axis to continuous to show 0 on the chart. See below - no data point at 0, and do not want the line drawn from -1 to 1.

I currently have the line style set: IF(month_num<-1,'<S2><W0>',IF(month_num>=1,'<S2><W0>'))

Is there any style for no line?

Thanks!!

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

May be use the expression in the background and change it to white()

IF(month_num > -1, White(),IF(month_num <=1, White() ))


Try this/.

View solution in original post

6 Replies
vishsaggi
Champion III
Champion III

May be use the expression in the background and change it to white()

IF(month_num > -1, White(),IF(month_num <=1, White() ))


Try this/.

kmstephenson
Creator
Creator
Author

The problem is it looks like the line appears to be drawn with the data point prior --- so I need to set month_num=-1 to WHITE for the line to disappear, but that also makes the data point at -1 disappear....

kmstephenson
Creator
Creator
Author

I just created two separate expressions that are the exact same - one for the line, and one for the symbols and this worked!

vishsaggi
Champion III
Champion III

Glad it worked. I just gave the expression for you to try how it looks as I do not have the sample app to tweak around.

Good work.

kmstephenson
Creator
Creator
Author

Thank you! I had been playing around with the background color and line styles but had used the same expression for both the symbol and line - your response helped me realize I needed to copy the expression and have one for the line and one for the symbol! Thanks again!!

vishsaggi
Champion III
Champion III

Please mark the answers with helpful/correct so that other members will benefit. 🙂