Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Scrolling start position in chart?

Hi there,

Is it possible to set a start position for a scroll bar in a chart object? (line chart)

Please see my attached images. As you can see, my x-axis dimension consists of periods, and I want to have the scroll bar placed to the right as default when I open the QlikView document. I have used the chart scroll setting (also attached) och the Presentation tab in the object. I thought it would be nice to see the last 12 months, but i don't want to reverse my dimension as getting the latest period to the left makes no sense.

I also read about the "Preverse scroll position" setting on the Layout tab, but that couldn't help me... Is it possible to get a solution to this slight problem?

Thanks in advance.

Best regards,

Filip

17 Replies
bnichol
Specialist
Specialist

The 'Reversed' check box in the Chart Scrolling section accomplishes right scroll-bar allignment.

Reversed.jpg

jpapador
Partner - Specialist
Partner - Specialist

The reversed, check box in your original screenshot should do what you are asking for.

swuehl
MVP
MVP

There is a way to set the initial position to right.

You need to create a Macro, and run it once. After that you can delete the Macro, the chart property will be kept changed.

The Macro code looks like

SUB StartScrollRight 

         SET chartObject = ActiveDocument.GetSheetObject("CH01") 

         SET chartProperties = chartObject.GetProperties 

        chartProperties.ChartProperties.XScrollInitRight = true

        chartObject.SetProperties chartProperties  

END SUB 

You'll need to adapt the Chart ID. Run the Macro e.g. from a button.

Anonymous
Not applicable
Author

Tried to run this macro on my chart object (CH***) but unfortunately it didn't happen anything...

swuehl
MVP
MVP

It's working for me with attached sample app.

If you open the app,you should see the upper chart scrolled to the right, the lower chart starts left by default.

You can change the setting of the upper chart by using the two buttons, but I think you need to save and reopen to see the change (it's an XScrollInitRight property).

I noticed another thread that reports issues with scroll bar settings in latest SRs, so just to check, on which QV version are you?

Anonymous
Not applicable
Author

Thank you a lot, it works!

Just had to save and reopen the document. Works great om QV 11.20 SR6.

Have a nice weekend!

Best regards,
Filip

slondono
Partner - Creator II
Partner - Creator II

It works for me

Not applicable
Author

Thanks Stefan,

Recently, I also found out how to solve the problem "scrolling from the right". It works, great!

I copy the the macro  you proposed into my qvw, and  setup Document Properties/ Triggers/ Document Event Triggers/ OnOpen/ Edit Action/ Actions- Run Macro / Edit Module/Macro Name: "StartScrollRight"; it works!

thanks!

William