ZoomToFit zooms to the smallest tier possible, and makes my page crash

Hi, I have enabled the zoom to fit feature in the toolbar of my gantt chart. When I use this, however, it zooms until I can see specific minutes, and it makes my page crash.

This is my timeline settings:

this.timelineSettings = {
      topTier: {
        unit: 'Month',
        count: 3,
        formatter: (date: Date) => {
          const year = date.getFullYear();
          const month = date.getMonth();

          if (month >= 0 && month <= 2) {
            return `Q1 ${year}`;
          } else if (month >= 3 && month <= 5) {
            return `Q2 ${year}`;
          } else if (month >= 6 && month <= 8) {
            return `Q3 ${year}`;
          } else {
            return `Q4 ${year}`;
          }
        },
      },
      bottomTier: {
        unit: 'Month',
        format: 'MMM',
      },
    };

The start and end date are calculated too:

3 Replies

VS Vignesh Sivalingam Syncfusion Team November 27, 2024 10:34 AM UTC

Hi Niels,

Greetings from Syncfusion.

We have tried to replicate the reported issue on our end, but the issue does not replicate. To assist us in diagnosing the problem, please provide the following details:
  • The code snippet of the full Gantt chart.
  • Details of project start date and end date used in the sample.
  • A video demonstrating the issue, including the steps to replicate it.
  • If possible, Could you please share us the replicable sample or modify in the attached sample.

Once we receive this information, we will be able to better identify the root cause of the issue and provide the necessary assistance.



Regards,

Vignesh Sivalingam



NV Niels Van Goethem November 28, 2024 08:25 AM UTC

While resolving several other issues in our gantt chart, this issue was also fixed



KG Kalpana Ganesan Syncfusion Team November 29, 2024 05:24 AM UTC

Hi Niels,


It sounds like you managed to fix an issue while addressing other problems in your Gantt chart. That’s great! please reach out if you have any questions.



Regards,

Kalpana.



Loader.
Up arrow icon