
While SAP Analytics Cloud (SAC) provides powerful tools for visualizing and analyzing data, one notable visualization currently missing from its standard offering is the Gantt Chart. Gantt charts are widely used for visualizing timelines, dependencies, and resource allocation, making them indispensable for effective project management and scheduling.
To bridge this gap, I've developed a custom Gantt Chart widget specifically designed for SAC users. This widget seamlessly integrates into your SAC environment.
SAP users across various business functions can leverage this custom widget to visualize numerous use cases, including:
In this blog, you'll learn step-by-step how to integrate and configure this custom Gantt Chart widget in your SAC environment to effectively visualize and manage your scheduling data.
To integrate the Gantt Chart custom widget into your SAP Analytics Cloud environment, please follow these steps:
Download Required Files: Download UI5GanttChart.json and UI5GanttChart.zip files from the GitHub repository.
Upload JSON Definition File:
Upload Resource Files:
For additional information, refer to the official SAP Analytics Cloud documentation.
The Gantt Chart custom widget is built using the standard UI5 GanttChartWithTable control. Some properties of the underlying UI5 control are exposed through the widget's Builder and Styling panels, allowing you to customize and adapt the visualization according to your needs. However, the UI5 GanttChartWithTable control offers numerous additional features, many of which are not yet implemented in this custom widget. This provides significant opportunities for future improvements and feature enhancements. A detailed discussion of the technical implementation will be covered in a separate blog post.
The Gantt Chart custom widget does not utilize standard SAC data binding capabilities like those available for table or chart widgets. Instead, it provides an API method named setDataSet that accepts one argument of type Array of ResultSet. You can easily obtain this data array by retrieving it from a standard SAC table widget. Specifically, call the getDataSource().getResultSet() method on the table widget, then pass the result directly to the custom widget using the following code:
var tasksResultSet = Table_Tasks.getDataSource().getResultSet();
GanttChart_1.setDataSet(tasksResultSet);
This approach requires you to use a standard table to retrieve the necessary data, even if this table is hidden from view. It's convenient to implement the provided code snippet within the onResultChanged event handler of the table, ensuring that each time the table data changes (e.g., applying a new filter), the Gantt Chart widget updates automatically.
Because of this approach, data will not be visualized in the Gantt Chart in design mode (designtime).
The custom widget also needs to understand how to extract information from the ResultSet. Thus, required fields need to be mapped to corresponding elements in the ResultSet through the "Dataset Parsing Settings" section in the widget's Builder Panel.
To inspect your ResultSet structure, you can use the following script to log it to the console:
console.log(tasksResultSet);
Here is an example of what your ResultSet might look like:
[
{
"@MeasureDimension": {
"id": "DUMMY",
"description": "DUMMY",
"rawValue": "1",
"formattedValue": "1"
},
"ID": {
"id": "1",
"description": "1",
"properties": {}
},
"Name": {
"id": "Phase 1",
"description": "Phase 1",
"properties": {}
},
"Description": {
"id": "Initial phase of the project",
"description": "Initial phase of the project",
"properties": {}
},
"Start_Datetime": {
"id": "2025-01-01 08:00:00.0000000",
"description": "Jan 1, 2025 8:00:00",
"properties": {}
},
"End_Datetime": {
"id": "2025-03-31 18:00:00.0000000",
"description": "Mar 31, 2025 18:00:00",
"properties": {}
},
"Parent_ID": {
"id": "",
"description": "",
"properties": {}
},
"Color": {
"id": "#3357FF",
"description": "#3357FF",
"properties": {}
}
},
{
"@MeasureDimension": {
"id": "DUMMY",
"description": "DUMMY",
"rawValue": "1",
"formattedValue": "1"
},
"ID": {
"id": "5",
"description": "5",
"properties": {}
},
"Name": {
"id": "Task 1.1",
"description": "Task 1.1",
"properties": {}
},
"Description": {
"id": "Research and planning",
"description": "Research and planning",
"properties": {}
},
"Start_Datetime": {
"id": "2025-01-05 09:00:00.0000000",
"description": "Jan 5, 2025 9:00:00",
"properties": {}
},
"End_Datetime": {
"id": "2025-01-25 17:00:00.0000000",
"description": "Jan 25, 2025 17:00:00",
"properties": {}
},
"Parent_ID": {
"id": "1",
"description": "1",
"properties": {}
},
"Color": {
"id": "#3357FF",
"description": "#3357FF",
"properties": {}
}
},
...
]
And the corresponding settings in the Builder panel:
Values in the ResultSet can be addressed in the following ways:
Below is an overview of each field required for configuring the Gantt Chart custom widget datset parsing:
The Gantt Chart custom widget provides additional configuration options to fine-tune its appearance and behavior. These settings are available in the widget's Builder panel. Styling-related settings will be covered in a separate section.
Dataset Timezone Offset from UTC (UTC ± X): If the value is not zero, the Start Time and End Time will be converted from the specified offset to UTC. This setting can also be used to visually shift the Gantt bars by a defined number of hours.
Total Horizon defines the complete time frame that is visible in the Gantt Chart. It can either be fixed or dynamic:
Visual Horizon defines the portion of the Total Horizon that is visible to the initially visible to the user.
Compact Representation
Example:
[
{
"field": "Name",
"label": "Tasks"
},
{
"field": "Description",
"label": "Description"
},
{
"field": "Start_Datetime.description",
"label": "Start"
},
{
"field": "End_Datetime.description",
"label": "End"
}
]
The Gantt Chart custom widget offers several visual customization options located in the widget's Styling panel. These settings allow to control the appearance of the chart bars and labels for improved readability and alignment with visual design standards.
The Gantt Chart custom widget for SAP Analytics Cloud fills a critical visualization gap by enabling intuitive and flexible timeline representation directly within SAC stories and applications. With its support for hierarchical structures, dynamic time horizons, and extensive customization options, the widget seamlessly integrates into diverse planning and reporting scenarios.
By following the setup and configuration steps outlined in this post, you can easily incorporate the widget into your dashboards.
Further enhancements and deep-dives into the technical implementation will be covered in upcoming posts. Feedback and contributions are welcome — feel free to comment and help shape the future of this custom visualization.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
19 | |
12 | |
12 | |
11 | |
10 | |
9 | |
8 | |
7 | |
7 | |
6 |