I am using the zoom extension and as expected, every time I zoom out, the width of the task cells reduces to match the timeline scale. However, the more I zoom, it reaches a point where the task cell is basically a very slim box / line. So is there a way I can set a minimum width to the task cells?
Hello Mihir,
You can set the min_column_width parameter in the zoom configuration for each level you have, then the width of the timeline cells won’t be lower than the specified value: Zoom Extension Gantt Docs(number
Hi Ramil,
It’s not quite the solution I was looking for. The width of the timeline scale itself shouldn’t change & ideally only the task’s visual representation should. Besides, In the snippet you provided, I set the min_column_width to 90 for every level, however it still results in a slim bar for the task representation when I zoom out to the Year zoom level -
Hello Mihir,
The scale cell represents the duration between the specific dates. For the year scale, it has the duration between one year and another.
The tasks are slim because they start and end at the specific dates, and the duration is less than a year. It is expected behavior.
If you want to change the minimal width of the task bars in the timeline, you can do that via CSS:
.gantt_task_line{
min-width: 20px;
}
But you need to know that in that case, it won’t represent the actual end_date in the timeline.