Complete Timeline is not available on Zoomin

Discuss issues related to v5.x
Post Reply
User avatar
rdonahue6
Posts: 195
Joined: Wed Jul 01, 2015 10:54 pm

Complete Timeline is not available on Zoomin

Post by rdonahue6 » Thu Oct 10, 2019 3:36 pm

Hello,

We are seeing issue, after zoomfit till minutes, user is not able to see complete timeline of GanttChart on scrolling.

Please see attached video for same.
It is reproducible on latest Advance example too.

Bryntum: Gantt Pro 6.0.8
EXTJS: Ext JS 6.6.0.258
Browser: Chrome
Attachments
GanttZoomInIssue.gif
Reproducible on Advance example
GanttZoomInIssue.gif (660.75 KiB) Viewed 96 times

User avatar
mats
Core Developer
Core Developer
Posts: 14658
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: Complete Timeline is not available on Zoomin

Post by mats » Thu Oct 10, 2019 5:12 pm

This is not a bug, it's by design. If you want more control over start and end dates when zooming, please see zoomToSpan method
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
rdonahue6
Posts: 195
Joined: Wed Jul 01, 2015 10:54 pm

Re: Complete Timeline is not available on Zoomin

Post by rdonahue6 » Mon Oct 14, 2019 7:48 am

Thanks Mats,

zoomToSpan() allows to zoomin once only and that is to specific span
e.g. if a project is of 3-4 years, it zooms to quater view, however, it doesn't zoom in further to say month view or week view.
It is not solving our purpose.

What we want is, user should allow till day or hours view and should make the horizontal scroll bar small enough to scroll till either start or end date of the project.

Thanks,
Pravin

User avatar
Maxim Gorkovsky
Core Developer
Core Developer
Posts: 2875
Joined: Wed Jan 08, 2014 11:46 am

Re: Complete Timeline is not available on Zoomin

Post by Maxim Gorkovsky » Mon Oct 14, 2019 8:46 am

Hello.
It seems that you need to use setViewPreset method, providing time span start and end dates. After preset is switched, you'll need to restore scroll manually.
Take a look at the docs for more info
https://www.bryntum.com/docs/gantt-for-extjs/#!/api/Gnt.panel.Gantt-method-getViewportCenterDate
https://www.bryntum.com/docs/gantt-for-extjs/#!/api/Gnt.panel.Gantt-method-scrollToDateCentered

Code: Select all

var center = gantt.getViewportCenterDate()
gantt.setViewPreset(...)
gantt.scrollToDateCentered(center)

User avatar
rdonahue6
Posts: 195
Joined: Wed Jul 01, 2015 10:54 pm

Re: Complete Timeline is not available on Zoomin

Post by rdonahue6 » Tue Oct 15, 2019 2:10 pm

Thanks Maxim,

we tried using

Code: Select all

setPresetView
, however, it also zooms once and then, doesn't zoomin for further clicks.

Code: Select all

var center = gantt.getViewportCenterDate();
var span = gantt.getEventStore().getTotalTimeSpan();
gantt.zoomIn();
var preset = gantt.getViewPreset();   /……As we don’t have hardcoded list of preset, fetching it from gantt.
gantt.setViewPreset(gantt.getViewPreset(),span.start,span.end)
gantt.scrollToDateCentered(center);


We found other settings

Code: Select all

zoomKeepsOriginalTimespan 
of

Code: Select all

Sch.mixin.Zoomable
which is

Code: Select all

false
by default, however, enabling it solving our problem.
Can you please comment that making it true will not have any side effect ?

Thanks,
Pravin

User avatar
Maxim Gorkovsky
Core Developer
Core Developer
Posts: 2875
Joined: Wed Jan 08, 2014 11:46 am

Re: Complete Timeline is not available on Zoomin

Post by Maxim Gorkovsky » Tue Oct 15, 2019 3:44 pm

You can use any public config, documented here, zoomKeepsOriginalTimespan is one of them. If at any point you are unhappy with the behavior demonstrated by gantt panel, please start a new topic on the forum and we will try to help you.

User avatar
rdonahue6
Posts: 195
Joined: Wed Jul 01, 2015 10:54 pm

Re: Complete Timeline is not available on Zoomin

Post by rdonahue6 » Wed Oct 16, 2019 11:47 am

Thanks Maxim.

Post Reply