Feature request: Gantt view: Width should scale with hours, not days #427

Open
opened 2025-11-01 20:56:05 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @vikunja-bot on GitHub (Apr 1, 2025).

Original issue by Yodbha on 2022-11-19T15:25:08.000Z

Version information:

Current (2022-11-19) try.vikunja

Steps to reproduce:

  1. Create task with almost 2 days duration. E.g. 2022-11-19T00:00 to 2022-11-20T23:59
  2. Switch to Gantt view

Expected behavior:

The task should span two days.

Actual behavior:

It spans one. Probably because it's not two full days. Possibly related to #2693.

Original issue on Gitea


@kolaente commented on 2022-11-21T11:23:43.000Z:

So it should round to the next day?


@kolaente commented on 2022-11-21T11:24:02.000Z:

@dpschen Didn't we talk about this recently?


dpschen commented on 2022-11-21T12:03:24.000Z:

Yes, didn't get to look at this in more detail yet.


Yodbha commented on 2022-11-21T17:56:01.000Z:

So it should round to the next day?

I guess it would be coolest to have it on sub-day increments. But for now rounding to the closest day should be fine. So floor if < 0.5 days, ceiling otherwise.

Originally created by @vikunja-bot on GitHub (Apr 1, 2025). _Original issue by Yodbha on 2022-11-19T15:25:08.000Z_ **Version information:** Current (2022-11-19) try.vikunja **Steps to reproduce:** 1. Create task with almost 2 days duration. E.g. 2022-11-19T00:00 to 2022-11-20T23:59 2. Switch to Gantt view **Expected behavior:** The task should span two days. **Actual behavior:** It spans one. Probably because it's not two full days. Possibly related to #2693. [Original issue on Gitea](https://kolaente.dev/vikunja/vikunja/issues/1997) --- _**@kolaente** commented on 2022-11-21T11:23:43.000Z_: So it should round to the next day? --- _**@kolaente** commented on 2022-11-21T11:24:02.000Z_: @dpschen Didn't we talk about this recently? --- _**dpschen** commented on 2022-11-21T12:03:24.000Z_: Yes, didn't get to look at this in more detail yet. --- _**Yodbha** commented on 2022-11-21T17:56:01.000Z_: > So it should round to the next day? I guess it would be coolest to have it on sub-day increments. But for now rounding to the closest day should be fine. So floor if < 0.5 days, ceiling otherwise.
Author
Owner

@tramir commented on GitHub (Aug 27, 2025):

Given that there is ongoing work on replacing the Ganttastic library with an in-house module, it seems the right time to kindly ask for an approach where the precision (to use the Ganttastic terminology) is not hard-coded. From what I can tell in the new implementation, the Gantt chart is hard-coded in days. Some projects run for many months and a Gantt chart forced to display a daily timeline is unusable. Would it be possible to code the precision as a function of the interval selected? Again, it seems like this would be the right time to implement this given that the PR has just been submitted 2 weeks ago.

Many thanks again for all the work!

@tramir commented on GitHub (Aug 27, 2025): Given that there is ongoing work on replacing the Ganttastic library with an in-house module, it seems the right time to kindly ask for an approach where the precision (to use the Ganttastic terminology) is not hard-coded. From what I can tell in the new implementation, the Gantt chart is hard-coded in days. Some projects run for many months and a Gantt chart forced to display a daily timeline is unusable. Would it be possible to code the precision as a function of the interval selected? Again, it seems like this would be the right time to implement this given that the PR has just been submitted 2 weeks ago. Many thanks again for all the work!
Author
Owner

@kolaente commented on GitHub (Aug 29, 2025):

Would love a PR with this.

@kolaente commented on GitHub (Aug 29, 2025): Would love a PR with this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#427