DHTMLX / gantt

GPL version of Javascript Gantt Chart
https://dhtmlx.com/docs/products/dhtmlxGantt/
GNU General Public License v2.0
1.43k stars 320 forks source link

Misaligned grids on windows machine #114

Closed glencoden closed 4 days ago

glencoden commented 3 months ago

In our gantt chart, we have two grids next to each other with content overflow only on one side. On windows machines, the space taken up by the scrollbar on the overflow-content side breaks the grid alignment.

Here's a screenshot of the task property columns on the left (with content overflow) and the timeline on the right.

gantt_layout_offset

gearcoded commented 2 months ago

@glencoden, That issue occurs because of the different sizes of the layout cells. On the left part, you have the grid and the horizontal scrollbar. On the right part, you only have the timeline without the horizontal scrollbar. Because of that, the timeline occupies more space and can be scrolled lower than the grid. You need to have the same number layout cells to have the same alignment.

You can group scrollbars so that both are displayed if at least one of them is rendered: https://docs.dhtmlx.com/gantt/desktop__layout_config.html#visibilitygroups

Here is an example: https://docs.dhtmlx.com/gantt/samples/07_grid/10_scrollable_grid.html

glencoden commented 4 days ago

Thank you, this helped!