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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
johnw
Champion III
Champion III

Problem with Logarithmic Scale

Is there a way to control the precision of the numbers displayed on the axis for a logarithmic scale? Although I'm displaying my numbers as #,##0.00%, the axis is displaying as #,##0%. My numbers can be up to 100%, but are typically just a few percent, and can get rather small, such as 0.15%. So the lowest grid line on the axis might be at 0.2%, for instance. For display, QlikView is showing this as 0%. This leads to the obvious but mistaken impression that some of my data is negative. Example attached. Suggestions welcome.

1 Solution

Accepted Solutions
johnw
Champion III
Champion III
Author

Showing the axes unfortunately made no difference. As I gather you might realize when you said "or at least x-axis", it isn't possible to show the 0-line for the y-axis, as it is infinitely far down. And it looks like NumberPresentation only affects the text on the data points, not the axis itself. Thanks for the suggestions, though!

I think I have an answer that will work, even if I'm not happy with it - use a static min and max and make my own text labels to overlay the "bad" ones. I just tried that in the real application, and it looks great. The scale now goes from 0.01% at the bottom to 100% at the top with 1% in the exact middle, and I was able to use inconsistent decimal places (100%, 10%, 1%, 0.1%, 0.01%). It looks perfect, and I'm pretty confident that the number will never go below 0.01%. I'll hold off on calling this one answered for a few days, in case we can come up with something better. But I'm going to go ahead and install what I have to stop confusing the users.

View solution in original post

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

John,

for starters, I'd allow the polt area border (or at least x-axis), to draw the 0-line.

As for the number format - there is an API "NumberPresentation" that can be applied to AxisDef. I never used it myself, so I can't quite suggest an example...

good luck!

Oleg

johnw
Champion III
Champion III
Author

Showing the axes unfortunately made no difference. As I gather you might realize when you said "or at least x-axis", it isn't possible to show the 0-line for the y-axis, as it is infinitely far down. And it looks like NumberPresentation only affects the text on the data points, not the axis itself. Thanks for the suggestions, though!

I think I have an answer that will work, even if I'm not happy with it - use a static min and max and make my own text labels to overlay the "bad" ones. I just tried that in the real application, and it looks great. The scale now goes from 0.01% at the bottom to 100% at the top with 1% in the exact middle, and I was able to use inconsistent decimal places (100%, 10%, 1%, 0.1%, 0.01%). It looks perfect, and I'm pretty confident that the number will never go below 0.01%. I'll hold off on calling this one answered for a few days, in case we can come up with something better. But I'm going to go ahead and install what I have to stop confusing the users.

johnw
Champion III
Champion III
Author

The users ended up redesigning their dashboard this week, and the chart in question got moved from a crowded dashboard to its own page, which gave me a lot more space to play with. I realized that only two of the types of records had any data more than about 12%, so I split the types into two separate charts using set analysis, both with regular scales rather than logarithmic scales. I think one chart with a logarithmic scale was a cleaner solution, but I try to avoid logarithmic scales in general because of how difficult they can be to read for the uninitiated. So while I prefer the old way, the users should be getting better information now, which is what really matters.