d-band / gantt

Gantt chart library using jsx support SVG, Canvas and SSR
https://d-band.github.io/gantt/
275 stars 61 forks source link

Freeze left side text column and scroll taskbars #26

Open hjbout opened 5 years ago

hjbout commented 5 years ago

Hi, thanks for nice library! I do have a question: is it somehow possible to make the task bars scrollable and the left text column frozen. So the task descriptions (text) will always be visible and the taskbars can be scrolled underneath. Thanks

calebfaruki commented 3 years ago

https://github.com/d-band/gantt/blob/ed89285a86af2fe907c66957aba17529baf7451d/src/gantt/index.js#L24

You can change the column width for the row labels when using StrGantt. But it will be 140px by default.

If you use CanvasGantt, it will be set dynamically because there is a divergence in implementation:

https://github.com/d-band/gantt/blob/2a842e03c9356011122b42b0f68ed504262ab8d9/src/CanvasGantt.js#L41

It also seems like SVGGantt has the same maxTextWidth implementation. Leads me to believe that StrGantt is probably deprecated?

https://github.com/d-band/gantt/blob/2a842e03c9356011122b42b0f68ed504262ab8d9/src/SVGGantt.js#L42