Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Scatter plot: always show dimension even when only one option?

I've been working with some scatter plots to show four values in a chart at once (a year series, ordered by day, plotted against an X and Y value). The chart works great when viewing over multiple year series at once, but when just one of the year series is selected, it shows the days in the legend and changes the colors of the plot points, which is not what I want.

Seen here, the year series plots as I want:

scatter-good.PNG.png

But when just 2012 is selected, the legend changes (I don't want that) and the persistent colors then apply at the day level (I don't want that either, I want the entire year series to be the same color as it was before filtering the years). See here:

scatter-bad.PNG.png

I've attached a sample document as well. I bet it's something straightforward that I'm missing, or that perhaps there is a good workaround. Anyone know of a solution? Thanks all.

1 Solution

Accepted Solutions
Not applicable
Author

In the end I was able to achieve what I was looking to do by forcing the legend to show all values (while suppressing null). Specifically, on the chart properties window, Dimensions tab, both "Suppress When Value Is Null" and "Show Legend" were checked.

I see all possible values in my legend, which is fine in my case, but I can also select just one of the years and it still displays appropriately, including all of the other dimensions and expressions involved. In effect, I am able to show 4 values per mark on the chart. Thanks all!

View solution in original post

8 Replies
MK_QSL
MVP
MVP

Dont understand your question properly... but please check attachment and let me know ...

Not applicable
Author

I see you added static min/maxes to the axes, but that wasn't what I was looking for unfortunately.

When I click on 2012 for example, I don't want the legend to display Days all of the sudden, I still want it to show Year with one entry: 2012. Also, I want the whole line/data points to be one color, the same persistent color that it was for 2012 previously (red).

When no years are selected it displays properly. When two years are selected it displays properly. When only one year is selected it does not display properly.

Anonymous
Not applicable
Author

I think it's similar to this one http://community.qlik.com/message/443989


Not applicable
Author

Hi Joshua,

I ran into the exact issue you are facing now. It took me a while to realize that that's how its supposed to work to make sense logically.

1. You have two dimensions. So when only one year is selected it has no other option but to drill down to the days. This is common when you have two or three dimensions Each line is made of different days for each year. Thats how you get the line in the first place. If you remove days you will see just dots for each year. When selecting one year all you are doing is seeing the different days for that one year which you have been seeing all along.

Maybe you can add a text in chart when only one year is selected to show which year is that.

2. The colors have to be different as that year is comprised of different dates.

Please let me know if it made some sense.

Thanks

AJ

Not applicable
Author

Oh so close! But because I have a list box with the years to select from, I can't just add in a blank because then the user would have to select the year they want + the blank to get the data to display the way I want. Also, it seems like adding in the dupes does throw off my axes. I'll brainstorm to see if I can come up with anything else down this dummy entry path, let me know if you have any thoughts. Thanks!

Not applicable
Author

Thanks AJ, it definitely makes sense but I still feel like I should be able to achieve the effect described. I know that QV is trying to be helpful, I just want it to act differently.

Anonymous
Not applicable
Author

You don't have to use the same field in list box and chart.  Each value of "List box Year" may correspond to two values in "Chart Year" - actual and blank.
As for the expression results - it depends on the data model and data, but certainly there are solutions.  Maybe just use 0-s for dups.

Not applicable
Author

In the end I was able to achieve what I was looking to do by forcing the legend to show all values (while suppressing null). Specifically, on the chart properties window, Dimensions tab, both "Suppress When Value Is Null" and "Show Legend" were checked.

I see all possible values in my legend, which is fine in my case, but I can also select just one of the years and it still displays appropriately, including all of the other dimensions and expressions involved. In effect, I am able to show 4 values per mark on the chart. Thanks all!