Page 1 of 1

Issue: Start Date rendering changes when ZoomIn/ZoomOut

Posted: Mon Sep 16, 2019 12:26 pm
by SIM-LTD
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.

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

Posted: Mon Sep 16, 2019 12:30 pm
by mats

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

Posted: Tue Oct 15, 2019 1:32 pm
by Animal
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.

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

Posted: Tue Oct 15, 2019 1:51 pm
by SIM-LTD
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.

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

Posted: Tue Oct 15, 2019 3:43 pm
by pmiklashevich
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

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

Posted: Tue Oct 15, 2019 6:22 pm
by SIM-LTD
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!

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

Posted: Thu Oct 17, 2019 8:18 am
by Maxim Gorkovsky
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')

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

Posted: Thu Oct 17, 2019 9:01 am
by Maxim Gorkovsky
Also instead of previous override you can try setting displayDateFormat on the gantt itself:

Code: Select all

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

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

Posted: Thu Oct 17, 2019 10:25 am
by SIM-LTD
Hi Maxin

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

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

Posted: Thu Oct 17, 2019 10:38 am
by SIM-LTD
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