I am trying to extend chart vertically by setting gantt.config.end_date. I am setting it using gantt.config.end_date configuration but it does not work. Vertical range is always only 2 days longer than the longest task end date.
Can you tell me how to extend vertical range, pls.
Thanks, Paul
Below is my code:
const maxDate = new Date(data.items.reduce((prevItem: IChecklistItemGantt, currentItem: IChecklistItemGantt) => {
if (currentItem.dueDate) {
return (currentItem.dueDate > prevItem.dueDate ? currentItem : prevItem);
}
return prevItem;
}).dueDate);
gantt.config.end_date = new Date(maxDate.getFullYear() + 1, maxDate.getMonth(), maxDate.getDate());
Hello Paul,
To make the gantt.config.end_date parameter work, you need to also specify the gantt.config.start_date parameter: end_date Gantt Docs.
You can check how it works in the snippet:
If that doesn’t help you, probably, the issue is related to the Gantt configuration, but it is hard to suggest what might be wrong as I don’t see your code.
In that case, please add your configuration to the following snippet and make sure that the issue is reproduced there:
Then, click on the Save button and send me the link.
Or send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.