Horizontal scroll between two dates

Hello! :slight_smile: I’m using scheduler in timeline view and I have a zoom possibility on scheduler

10

(on every change i’m recalculate x_size and x_step of my timeline and use scheduler.setCurrentView() to refresh) and it is working good. But also i want to have horizontal scroll from some date in past to some date in future (these dates depends on scheduler configuration).

Can i achieve this somehow?) Thanks.

P.S. I’ve already set   scrollable: true,   but horizontal scroll appears only randomly.

Hi @Kendzi,

I tried to reproduce the issue and the horizontal scroll appears each time when the scale settings are updated.
Please check the snippet that demonstrates it: http://snippet.dhtmlx.com/d46981653

If that doesn’t help you to solve the problem - please update the code in the snippet tool to replicate and share with me the new link.

@Polina Hello, sorry, maybe i’m bad with explanations:) I have no problems with scale settings, i just want to have horizontal scroll which is Not affected by the scale params, but only from two dates.

Can i achieve it by playing with this params:
timeline.x_step
timeline.x_size
timeline.x_start
timeline.x_length
?
Usually users want to scroll between two dates, and sometimes they want to zoom something. Thanks for answers

@Kendzi
Zooming works in my demo by scrolling, did you try this way to update scale settings?
Parametres you mentioned also updated each time. The horizontal scroll exists all the time.

If you want to specify time range (two dates to scroll between) - use timeline.x_size property for that.

@Polina Thanks a lot :slight_smile: Sorry for delayed answer, now all is working fine.
Last question is about vertical scrolling and sections (in Tree view). Can i pin, for example, one section at the top while vertical scrolling? Big thanks for your help.

@Kendzi,

Unfortunately, there is no in-built way to pin lines in the Timeline view.

To implement it, you should copy HTML elements of the first line, set position: fixed; for them and show over a line that exists by default.