Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
rbecher
MVP
MVP

Free Lines/Angles in a Line Chart

Is there any possibility to add free lines or angles into a line chart?

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
11 Replies
johnw
Champion III
Champion III

Sorry, yes, y = 0.5 * X + 4.5 is 22.5 degrees. (edit: Gah! It's about 26.565 degrees. I'm totally failing at math today.) From(x = 1, y = 5, degree = 45) is = x + 4. My bad at messing up a simple algebraic transformation, but the principle still holds - all it takes is simple algebra. Now, if you go plug = x + 4 into the graph, you'll STILL notice that it isn't 45 degrees, but that's because the SCALES are different. If the scales were the same, it would be 45 degrees.

As for starting only at month 3, the answer to that is my previous suggestion: " If you don't want lines, and just want line segments, then you'll probably need to additionally set the value to null outside of the range you want, and suppress nulls."

So here's the example again. This time, I'm using the formula = x + 4, I've made the two scales match (same length vertically from 0 to 6 as horizontally from 0 to 6), and I've set the value to null outside the range you want, and I've suppressed 0 values. You now have a 45 degree line that starts at 3,7.

rbecher
MVP
MVP
Author

John,

thanks for help! This is a simple example but I can start from here. I like your approach with the if-formula (qvw attachment). This is a very good solution for line segments! More flexible than another set of values you suggested in your last two posts.

Cheers, Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine