DevExtreme v24.2 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

React Gantt - Task Template

The DevExtreme JavaScript Gantt templates help customize the layout and appearance of individual task elements. Templates allow you to mix HTML code with any DevExtreme JavaScript component - and position desired elements within the container. In this demo, a template is used to display images within tasks and change their background color.

To give you the ability to edit code on the fly, the demo uses SystemJS. For this reason, launching the demo takes some time. We strongly recommend that you do not use this approach in real projects.
Backend API

Implementation: Use the taskContentTemplate template to customize and align task information within the template container. For each task, use the item property to obtain task information (title, resource, progress) and wrap it into div elements. Then, apply CSS styles to these div elements and place them into the container.