Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

chrisweldon
New Contributor III

Bar chart resizing when selection made

New to QlikView so please be gentle!  Think I am getting to grips with it, but I need help...


I have a bar chart with about 15 countries on the x-axis, where the bars are showing YTD sales performance against plan (+/- % with labels.

However, I have a number of other pieces on information, PY Sales, Full Year Plan, Full Year Forecast I would like to show in a table below for the same countries.  I would really like them to line up!

I can get this to work if all the countries are selected, but when I change the list box settings, obviously the chart is redrawn and the bars become wider.  Is there anyway to stop that, and just leave the right hand side of the chart blank?  Then the pivot table underneath would still line up (driven by the same selections from the list box.

The other way I wondered about doing it was changing the labels on the x axis to reflect the 4 or 5 values, separated by returns to make it look like a table.  But I don't know how - and I think the country name  would have to be vertical, and the rest would need to be horizontal?

Does any of that make sense?  Sorry - still using Personal Edition while our IT guys get the real thing set up , so I can't open anyone elses work / examples!

Many thanks in advance!

Chris

5 Replies

Re: Bar chart resizing when selection made

Could you add pictures from your app?

You can create another chart and play hide and seek based on your listbox selection.

chrisweldon
New Contributor III

Re: Bar chart resizing when selection made

Robert,

Thanks for your help.

Here are the picturesRegion.PNGEMEA.PNG

Is there a way of controlling the width of the columns in the table below the chart?  I guess the maths could be fairly straight forward if you knew how many columns and the total width of the chart above?

Cheers

Chris

Re: Bar chart resizing when selection made

You have 6 Regions and 10 countries so the widths of the bat will change accordingly.

In Presentation tab on the right there are few settings but i guess you are looking for something else..

chrisweldon
New Contributor III

Re: Bar chart resizing when selection made

Yes - so I want to make the width of the column in the table below equal to the width of the table (less the width of the first and last columns) divided by the number of countries selected.  Is it possible to loop through the columns and set the width depending on whether it is first, last or one of the middle ones?  I guess this would be a macro but I cannot work it out!

I have moved away from a pivot table to a straight table with the horizontal setting and I am tempted to lose the drill down as I don't think it really is what the user wants, so that might help - but not sure what to do next.   Any ideas?

Cheers

Chris

chrisweldon
New Contributor III

Re: Bar chart resizing when selection made

I just found the a macro at the bottom of this link which seems to do what I want...

Dynamic pivot table column width

But it doesn't seem to work for me.  I have added message boxes at the appropriate places to trry and debug, and it seems to be failing at the point of

pwidths = chart.GetPixWidths(0,2).PixWidths

Any idea why?  Is this an appropriate macro to use?

Cheers

Chris

Community Browser