gantt icon indicating copy to clipboard operation
gantt copied to clipboard

How to dynamically adjust the width of Gantt chart scroll bar

Open zhao-mi opened this issue 3 years ago • 1 comments

How to dynamically adjust the width of Gantt chart scroll bar 甘特图滚动条宽度如何动态调整

zhao-mi avatar Jan 30 '22 03:01 zhao-mi

@zhao-mi, there is no built-in function for that. But you can implement a custom solution by using the Gantt API and Javascript. First, Gantt has the property that reserves the scrollbar sizes in the layout: https://docs.dhtmlx.com/gantt/api__gantt_scroll_size_config.html You need to update that property and reinitialize Gantt to see the changes.

Also, the scrollbars are rendered by the browser. So, you need to add the styles to modify their appearance. To dynamically change their sizes, you can use CSS variables. Here is an example of how it can be implemented: http://snippet.dhtmlx.com/5/9ec8f8e62

gearcoded avatar Feb 10 '22 06:02 gearcoded