Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Line chart: Secondary x- axis?

Hi,

I need to overlay two lines on top of each other for comparison purposes. These two lines measure the same metric but in two different periods of time, which is what is being compared.

I have only managed to come up with this:

line_chart_comparison.png

Now this is not very useful for comparison, especially when the gap between the red and blue lines widens (because I selected a period way in the past for example).

What I need is to overlay these two lines on top of each other, so that I can compare the trend. That would mean that I need a seperate x-axis for each line, and have these 2 x-axis within the same graph area. In this particular example, one axis would have values for 09/2015, while the other for 08/2015.

This is what I need (watch out for Paint):

line_chart_overlaid.png

Having 2 y-axis within the same graph, but I could not find a way to do the same thing for the x-axis.

Any tips?

14 Replies
Not applicable
Author

Thanks, that looks like a solution in the right direction. I was not aware of the alternate state feature until now.

What's missing now is an improvement in how dates are distributed over the ValueLoop() dimension so that both generated dates can span the full length of the x-axis of the graph. Right now if one period is 1 month and the other period is 2 months, the graph corresponding to the 1 month spans only half of the x axis while the 2nd one spans the whole x-axis. After this change, the feature will fulfil the requirements fully. I'll give it a try.

Not applicable
Author

I achieved some improvement over how the dates span the x-axis. Here's the result:

full_axis_span.png

The 6 days of the red period are extended to span the 20 days of the blue period, although this distribution could be done better to span the rightmost points. Also, the dates that appear as text on the axis get too cluttered; after a brief effort I wasn't able to space them apart (by omitting some values)

swuehl
MVP
MVP

If you are going to stretch the red line, the slope of the red line can't be compared directly to the blue one.

You can't even easily read from the chart the value of both lines after same x days after period start.

What information do you want to retrieve from this chart then?

Not applicable
Author

By stretching the line you enable the trend comparison. (as long as the curvature is maintained and the line is not skewed differently than the original).

Rodney
Contributor III
Contributor III

Hi, 

sorry to reply to an old thread but no one has replied to the new one I created here 

Does anyone know how to do this in QlikSense? 

Thanks in advance.