Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
tobmueller
New Contributor

Fixing chart scaling.

I am currently trying to fix the automatic scalling of a chart if 'forced 0' is deactivated. I am using a 'line chart' more speciffic the stacked line chart (image).

If I deactivate 'forced 0' the effect is like I want it. Thing is it zooms in so much that some data is not shown anymore.

I believe I need to fix this by adding a dynamic 'Static min' value.

I need to get the minimal value of the first Dimension of the largest, combined by first dimension, second  dimension (Yeah I know, but I have no idea how to describe my problem in a better way)

With  'forced 0':

Qlickview_dia_scaling_1.PNG

Deactivated 'forced 0':

Qlickview_dia_scaling_2.PNG

And thats what it's supossed to look:

Qlickview_dia_scaling_3.PNG

Long story short, I am not able to write a sufficient line of code to get the min value of any given date from the largest  in 2nd dimension.

4 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Fixing chart scaling.

In the top right area of the tab axis you could define the min/max/interval values of your scale whereby min/max is usually something like:

min(TOTAL value)

     or maybe

min(aggr(sum(value), Dim))

The interval might be set manually if the span between min/max could be estimated and didn't change much by different selections. If not you need to set something like this: round((max - min) / NoOfInterval).

Beside this removing the time-part from the dimension and/or using a different and shorter formatting of the dimension-values will increase the space for the lines and with this the readability of the information.

- Marcus

Highlighted
tobmueller
New Contributor

Re: Fixing chart scaling.

Yeah I'm aware of the static min max values. What I need is a dynamic min scalling so that all groups(2nd Dim) will be shown. I sorted those by size, the largest is at the bottom going all the way up to the smallest. I'm not however able to generate a function that gives me the min value of the largest group.

Setting those value static will not work as there are huge differences(10^5).

PS: The testdata has no time. However the real data will.

Highlighted
tobmueller
New Contributor

Re: Fixing chart scaling.

I tried MIN(AGGR(MAX(value), time_dim)).  This however results in the wrong result

Highlighted
tobmueller
New Contributor

Re: Fixing chart scaling.

Thanks for your help. The culprit of my problem was one value in my test data which resulted in seemingly wrong results. Your solution is correct "MIN(AGGR(MAX(value), time_dim))". Sorry for the inconvinience.