Closed boileru closed 11 months ago
You didn't include your code, but it sounds like your issue is in "width" formula. Specifically I'm guessing you didn't change the denominator to divide by two years instead of one year.
The code in the repo is: "width": "=((Number(Date([$End])) - Number(Date([$Start]))) / (Number(Date('' + getYear([$Start]) + '/12/31')) - Number(Date('' + getYear([$Start]) + '/01/01')))) * 100 + '%'",
You probably want to change that denominator to be two years
I created a column formatting that allows you to set the start and end dates of the Gantt chart to any value. If you want to create a Gantt chart for two years, please use the following column formatting. https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-gantt-chart
generic-yearly-gantt-chart/
Suggestion (the more details, the better)
I am trying to use this for start and ends dates from 2022 and into 2023. For example, Jan 2022 = 0, July 2022 = 6, Dec 2022= 12, June 2023 = 18, Dec 2023 = 24. essentially to be able to see a full 2 year window for projects. However, not able to get the dark bars to line up to the right places . In the first row in the example , the start date is correct at 2/1/2022 but it should end at 8/01/2022 but goes further than it should