Search results

Scrolling

02 Dec 2022 / 2 minutes to read

The scrollbar will be displayed in the gantt when content exceeds the element width or height. The vertical and horizontal scrollbars will be displayed based on the following criteria:

  • The vertical scrollbar appears when the total height of rows present in the gantt exceeds its element height.
  • The horizontal scrollbar appears when the sum of columns width exceeds the grid pane size.
  • The height and width are used to set the gantt height and width, respectively.

The default value for height and width is auto.

Set width and height

We can even set pixel values to width and height of gantt container using width and height properties.

Source
Preview
App.jsx
App.tsx
Copied to clipboard
Copied to clipboard

Responsive with the parent container

Specify the width and height as 100% to make the gantt element fill its parent container. Setting the height to 100% requires the gantt parent element to have explicit height. Also, the component will be responsive when the parent container is resized.

Source
Preview
App.jsx
App.tsx
Copied to clipboard
Copied to clipboard