Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
pranaview
Contributor II

How to prevent bars from overlapping with the legends in the Bar chart when a user make a selection

Hi Guys,

I am working on a bar chart. Everything is done but on UI front, I am facing an issue. See below images for more info 

So, the below image shows the default state of the bar chart and everything looks fine.

Overlapping.PNG Now when the user selects for example first two bars then things get bad. See the image below, the count gets overlapped with the legend.

OverlappingIssue.PNG

 Now I know I can make use of Ctrl + Shift keys to adjust that but the thing is the legend has to be placed here not on the top and one more way that I can avoid is by reducing the area where bars are placed to avoid any overlapping with the legend area again using with the same approach but I can't do that either as it makes the bars look really smaller as chart itself is pretty small and client has already rejected that idea.

So, is there any other way I can work around this problem. Is there any way to you know dynamically scale the Y-axis range so bar length automatically adjusts?

I can do with any sort of suggestion right now.

Thanks,

Pranav

 

 

 

5 Replies
Partner
Partner

Re: How to prevent bars from overlapping with the legends in the Bar chart when a user make a select

Hi,

The problem is that the legend is placed within the chart itself, so there is no way you can avoid that unless you move the legend outside the axis. Can you not just move the legend right so it site outside the axis?

So this

Capture1.JPG

instead of

Capture.JPG

pranaview
Contributor II

Re: How to prevent bars from overlapping with the legends in the Bar chart when a user make a select

Hi,
The thing is we have multiple charts in the sheet so size of the chart is pretty small, I have already placed the legend to the extreme right and like I mentioned reducing the bar area is not an option. So, I was looking for a way which enables the axis scale adjusts dynamically if there's an overlap but as you have mentioned it seems unlikely. Thanks for your response though.
Partner
Partner

Re: How to prevent bars from overlapping with the legends in the Bar chart when a user make a select

Hi, 

yes, unfortunately the options would be to either increase the size of the chart and move the legend outside the axis or move the legend to the top or bottom of the chart. 

 

MVP & Luminary
MVP & Luminary

Re: How to prevent bars from overlapping with the legends in the Bar chart when a user make a select

You could try setting the Static Max value of the expression axis to something that's the max total bar value times some factor. max(aggr(sum(total <Dimension1> Amount),Dimension1))*1.2


talk is cheap, supply exceeds demand
pranaview
Contributor II

Re: How to prevent bars from overlapping with the legends in the Bar chart when a user make a select

Hi Gysbert,
Thanks for your suggestion. I will try to customize it and see if it works.