# Gantt Panel Resize Plugin
URL: https://pro.rv-grid.com/api/gantt-panel-resize-plugin/
Source: src/content/docs/api/gantt-panel-resize-plugin.md
### `GanttPanelResizeDetail`

Payload emitted with each `gantt-panel-resize` event.

```ts
interface GanttPanelResizeDetail {
  /** The current width of the gantt panel in pixels. */
    readonly width: number
}
```

---

### `GanttPanelResizePluginConfig`

```ts
interface GanttPanelResizePluginConfig {
  /**
     * Initial width of the gantt (colPinEnd) panel in pixels or as a percentage
     * of the grid width (e.g. `"40%"`).
     * Defaults to the current rendered width of the panel.
     */
    initialWidth?: number | string
}
```

---

### `GanttPanelResizePlugin`

GanttPanelResizePlugin adds a drag handle on the left edge of the
pinned-end (gantt chart) viewport, allowing the user to resize the split
between the task-list columns (rgCol) and the gantt chart (colPinEnd).

Dragging the handle left expands the gantt panel; dragging right shrinks it.
An `gantt-panel-resize` event is emitted on the revogrid element during and
after each drag with `{ width: number }` in its detail.

```ts
class GanttPanelResizePlugin {
  /**
     * Programmatically set the gantt panel width.
     */
  setPanelWidth(width: number): void;

  /**
     * Returns the current gantt panel (colPinEnd) width in pixels, or null if
     * the viewport is not yet rendered.
     */
  getPanelWidth(): number | null;
}
```
