Issue: Start Date rendering changes when ZoomIn/ZoomOut

Our state of the art Gantt chart
Post Reply
User avatar
SIM-LTD
Posts: 419
Joined: Thu Mar 28, 2019 4:12 pm

Issue: Start Date rendering changes when ZoomIn/ZoomOut

Post by SIM-LTD » Mon Sep 16, 2019 12:26 pm

Hi

When Zoom-In/zoom-Out the Start-Date render changes, in both Column and Tooltips.

Look at the Screenshot.

This is easily reproducible from your https://www.bryntum.com/examples/gantt/advanced/
And then just click Zoom-In and after Zoom-Out
You'll notice that both Start Date rendering is changing in the Column Start and in the Tooltips
Then render make the Start Date only with the hour (the Date is not rendered)

That makes impossible to know which date is the task start.
Attachments
Capture d’écran 2019-09-16 à 12.09.48.png
Capture d’écran 2019-09-16 à 12.09.48.png (216.66 KiB) Viewed 64 times
Capture d’écran 2019-09-16 à 12.10.00.png
Capture d’écran 2019-09-16 à 12.10.00.png (220.86 KiB) Viewed 64 times

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

Re: Issue: Start Date rendering changes when ZoomIn/ZoomOut

Post by mats » Mon Sep 16, 2019 12:30 pm

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
Animal
Core Developer
Core Developer
Posts: 81
Joined: Fri Oct 13, 2017 12:36 pm

Re: Issue: Start Date rendering changes when ZoomIn/ZoomOut

Post by Animal » Tue Oct 15, 2019 1:32 pm

https://app.assembla.com/spaces/bryntum/tickets/9243/details

The GanttDateColumn class uses the same format that the current ViewPreset (zoom level) of the scheduler by default.

If you configure it with

Code: Select all

format : 'your date format string'
it will always use the format you specify.

User avatar
SIM-LTD
Posts: 419
Joined: Thu Mar 28, 2019 4:12 pm

Re: Issue: Start Date rendering changes when ZoomIn/ZoomOut

Post by SIM-LTD » Tue Oct 15, 2019 1:51 pm

Hi

We do not know what you intend to say.

Nonetheless, as you can see the screenshot, made from you online demo, when ZoomIn/ZoomOut
the startDate and EndDate have their date format updated to HOUR (only) which does not allow to see when the Task start and finish
(either in the toolTip and Grid) The view in the Scheduler show "Day" but the format of both startDate and EndDate is in hour!

Thus, we believe there is an issue, which does not allow to read the Gantt accordingly.

User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 2301
Joined: Fri Apr 01, 2016 11:08 am

Re: Issue: Start Date rendering changes when ZoomIn/ZoomOut

Post by pmiklashevich » Tue Oct 15, 2019 3:43 pm

Hello,

Updating date column's format while zooming is expected default behaviour if `format` is not specified for the column. Gantt's displayDateFormat will be used as a default value and the format will be dynamically updated while zooming according to the displayDateFormat value specified for the ViewPreset being selected.

We've updated Advanced example to stick to the fixed value:

Code: Select all

    columns : [
        // format is specified explicitly to do not rely on gantt.displayDateFormat
        { type : 'startdate', format : 'll LT' },
        ...
And also updated the docs to make this behaviour clear.

Best,
Pavel
Pavel Miklashevich - Core Developer

User avatar
SIM-LTD
Posts: 419
Joined: Thu Mar 28, 2019 4:12 pm

Re: Issue: Start Date rendering changes when ZoomIn/ZoomOut

Post by SIM-LTD » Tue Oct 15, 2019 6:22 pm

Hi There

Thank you for your extra explanation and we tested if from the online Demo where we added
{ type : 'startdate', format : 'll LT' },
. And the outcomes is the Date format in the column is preserved.

Nonetheless, is this an issue or is this a standard process?

According to your answer, it seems to be a standard process.

Hence, do we have to set this portion of code in the Tooltip? so to ensure that the Start & end Date render correctly?

Finally, quite honestly why changing the format of the Start / End Date of a Task when the preset view changes?
The Start/End Date are values that should be always rendered (moreover for a task that last more than 1 Day)
under the same format, no matter the Zoom level used in the Gantt Chart.
Because look at the screenshot herewith, in the tooltip the date format has different format according to the Zoom Level, and some are wrong for Day Preset view!
Attachments
Capture d’écran 2019-10-15 à 17.34.37.png
Capture d’écran 2019-10-15 à 17.34.37.png (240.91 KiB) Viewed 20 times
Capture d’écran 2019-10-15 à 17.34.14.png
Capture d’écran 2019-10-15 à 17.34.14.png (203.11 KiB) Viewed 20 times
Capture d’écran 2019-10-15 à 17.17.35.png
Capture d’écran 2019-10-15 à 17.17.35.png (245.67 KiB) Viewed 20 times

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

Re: Issue: Start Date rendering changes when ZoomIn/ZoomOut

Post by Maxim Gorkovsky » Thu Oct 17, 2019 8:18 am

We discussed this problem, checked how it worked in old gantt and decided this is worthy to be fixed: https://app.assembla.com/spaces/bryntum/tickets/9382-tooltip-date-format-should-be-more-informative-during-zooming
Thank you for report.
As a workarond you can set displayDateFormat after preset change. Smth like:

Code: Select all

gantt.on('zoomchange', () => gantt.displayDateFormat = 'll LT')

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

Re: Issue: Start Date rendering changes when ZoomIn/ZoomOut

Post by Maxim Gorkovsky » Thu Oct 17, 2019 9:01 am

Also instead of previous override you can try setting displayDateFormat on the gantt itself:

Code: Select all

gantt = new Gantt({ displayDateFormat : 'll LT' })

User avatar
SIM-LTD
Posts: 419
Joined: Thu Mar 28, 2019 4:12 pm

Re: Issue: Start Date rendering changes when ZoomIn/ZoomOut

Post by SIM-LTD » Thu Oct 17, 2019 10:25 am

Hi Maxin

Very nice to you.
We'll do so and looking forward to seeing the new release.

User avatar
SIM-LTD
Posts: 419
Joined: Thu Mar 28, 2019 4:12 pm

Re: Issue: Start Date rendering changes when ZoomIn/ZoomOut

Post by SIM-LTD » Thu Oct 17, 2019 10:38 am

Hi

Just want to let you know that the last workaround set at the Gantt level is much better since is allowed to keep the date format in both Column Grid and ToolTip, as it should be...

Thank you

Post Reply