Skip to Content

Creating Customized Shapes in Gantt Chart Sap UI5

sap.gantt.GanttChartContainer is the UI5 control available for creating ganttchart. GanttChart is the graphical representation of the data.

There are multiple shapes that can be created using this control. Here is the way of creating few shapes using GanttChartContainer alongwith GanttChartWithTable.Below is screenshot of some shapes created.



Task1 is the name of a product across which there can be multiple orders . The Blue color rectangle is an task11, orange color half triangle represents task12, the Green color shape represents task13, the Red rectangle attached to blue rectangle represents task14.

The data for creating these shapes is created as follows,


Starttime and endtime in the data indicates the starting and ending point of shape.

The shape to be drawn are defined as below:


All the defined shapes are set to the GanttChartWithTable as below:


All the shapes have properties as “fill” which  lets decide the choice of color, “title” value is displayed over the defined shape, “enableDnD” gives control over if the shape has to be drag-able or not.

Here is the snippix link with the example of the shapes drawn ,

You must be Logged on to comment or reply to a post.