I'm putting a Gantt Chart together based on data in a SharePoint list. In my list, a record has a Start Date and an End Date.
The Horizontal Gallery contains the months that stretch from the earliest activity start date until the month of the latest ending activity. The Horizontal Gallery contains a nested Vertical gallery which displays the record's Activity name, with the X being calculated on the number of days since the 1st of the earliest month of activities, multiplied by the number of pixels that a day represents.
The issue that I have is that since not all months contain the same number of days, if I have a long activity, the length of the activity stretches past the End Date because it's going on the number of days instead of what the calendar looks like. I hope that makes sense.
In this example, Deliverable 4 is showing as stretching into the beginning of Jan 2026, even though the Start Date is 12/01/2024 and End Date for it is 12/31/2025 (duration is 396 days):
Is there a way to set the widths of the Horizontal gallery to be variable based on the number of days in that month to make the calculation work properly? Does anyone have a better approach to this?