The treeAnimationDuration property ("Auto" | number) sets the duration of the task group expand/collapse animation in milliseconds.

Declaration

DayPilot.Gantt.treeAnimationDuration

Default Value

"Auto"

Notes

"Auto" chooses a duration suited to the expanded or collapsed group, normally within 240–550 ms. Set a number to use the same duration for every group. Numeric values must be finite and nonnegative; 0 makes the transition immediate.

treeAnimation determines whether animation is enabled. With treeAnimation: "Auto", a reduced-motion system preference disables animation regardless of the duration. Invalid values throw an exception.

Available since version 2026.4.7077 of DayPilot Pro for JavaScript.

Examples

JavaScript configuration:

const dp = new DayPilot.Gantt("dp", {
  treeAnimationDuration: 350
});
dp.init();

Angular configuration:

config: DayPilot.GanttConfig = {
  treeAnimationDuration: 350
};
<daypilot-gantt [config]="config"></daypilot-gantt>

React:

<DayPilotGantt treeAnimationDuration={350} />

Vue:

<DayPilotGantt :treeAnimationDuration="350" />

See Also

Tree configuration

Availability

Availability of this API item in DayPilot editions:

ProductLitePro
DayPilot for JavaScript