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

x-axis scroll bar to keep right by default

Hi - I have built a combo chart and  set the max visible as 12 and enabled X-Axis scroll bar if it goes above 12 months. My sort order is date dimension with ascending order. All works well, but I am unable to keep the x-axis scroll bar to be always right by default. For ex, currenly if I close and open up the qvw file then you can see the scroll bar going back to left and use can scroll through to the right. But I need it by default to be at the right side as shown in the screen shot. Is there anyway we can do this? If so, any idea pl?

12 Replies
Not applicable
Author

combochart.bmp

Not applicable
Author

I'm not sure what version you are using but on 11 under the presentation tab of the chart properties there is a "Reversed" check box in the chart scrolling section that should do as you need.

This works on screen but not on reports as of yet.

m_woolf
Master II
Master II

This code will look at all objects on all sheets, and if the object ID is in strSearch, it will set the scroll bar to the right.

sub ChartXScrollInitRight

stop

      s=ActiveDocument.NoOfSheets

      for i = 0 to s-1

            set s=ActiveDocument.Sheets(i)

            objs=s.GetSheetObjects

            for j=lbound(objs) to ubound(objs)

                strCHID = objs(j).GetObjectID

                strSearch = "CH61,CH59,CH57,CH62,CH65,CH66,CH67,CH68,CH69"

                intFound =  instr(strSearch,mid(strCHID,10,4))

                if intFound > 0 then

                   Set rep = ActiveDocument.GetSheetObject(strCHID)

                   set p = rep.GetProperties

                   p.ChartProperties.XScrollInitRight = True

                   rep.SetProperties p

               Else

'     Do nothing'

               end if

            next

      next

end sub

Not applicable
Author

Thanks both for your reply, we are now in QV 10, but soon we will be moving into 11 so will use the property as suggested instead of having macro. Thanks

sujeetsingh
Master III
Master III

It did not work for me in Q11

Not applicable
Author

i am working in QV 10,Just  x-axis scroll bar put in right and save it..hope it will work..

regards-bika

Not applicable
Author

Has anyone found a solution for this?  I am working in QV 11.

Not applicable
Author


In QV 11, under the Presentation tab if you enable the X-Axis Scroll bar and also check the "Reversed" box it should work for you.  My sort is based on date so setting Reversed has the charts default to the latest date or x-axis scroll bar to the far right

sujeetsingh
Master III
Master III

What about Straight table and Pivot table