Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ni_avoss
Creator
Creator

align axis within combochart to same scale

hi there,

similar to this chart in the upper right at 2:30 https://youtu.be/RkVDi0b2hmk?t=150

I want to create a combo chart with a metric on the left and another target metric using lines and the right axis. as seen in the video, this doesn't make sense if those two axis don't align and share the same scaling.

so is there a smart solution to align those two ? automatic scaling works good for a single axis, but not for both

I came up with calculating the scale limits for both like

 

=if(
max(aggr(Sum({<Version={'$(=only(RefVersion))'}>}Value),[Date...YearMonth]))
	>max(aggr(Sum(Value),[Date...YearMonth]))
,max(aggr(Sum({<Version={'$(=only(RefVersion))'}>}Value),[Date...YearMonth]))
,max(aggr(Sum(Value),[Date...YearMonth]))
)

 

which translates to: if(left axis > right axis, left axis, right axis)

but this is a very fragil approach and is also doesn't react two changes of the x-axis.

any ideas ?

thanks;

alex

 

Labels (3)
1 Solution

Accepted Solutions
ni_avoss
Creator
Creator
Author

ok, found out myself.

possible to assign it to the primary axis when line chart is selected as second measure

View solution in original post

2 Replies
ni_avoss
Creator
Creator
Author

ok, found out myself.

possible to assign it to the primary axis when line chart is selected as second measure

Marcel_Garcia
Contributor III
Contributor III

Marcel_Garcia_0-1657789277069.png