cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 Gantt Chart shapes not clearing after refresh

Former Member
0 Kudos

Hi All,

I have developed a Gantt chart in SAPUI5 and bound that to an oData model. When I am trying to filter or clear the data, the chart shapes are not getting cleared from the chart area as shown below in the screenshot.

Screenshot issue.png

This only happens for the shapes visible on the UI, the other shapes are getting cleared.

Using the below code to clear the data and bind again:

var oEmptyData = {
"root": {
"id": "root",
"level": "root",
"children": []
}
};
this.oJsonModel.setData(oEmptyData);

this.oGanttChartWithTable1.setModel(this.oJsonModel, "Model1");
this.oGanttChartWithTable1.bindRows({
				path: "Model1>/root",
				parameters: {
					arrayNames: ["children"]
				}
			});

Accepted Solutions (0)

Answers (2)

Answers (2)

jorge_cabanas
Participant
0 Kudos

Hi,

First step to solve it: Don't set the data to the table, set it to the "GanttChartContainer" in the higher level. Please suit the next snippets in your code

XML View

<GanttChartContainer id="GanttChartContainer">

Controller

var oGanttChartContainer = this.getView().byId("GanttChartContainer");
this.oModel = new JSONModel();

oGanttChartContainer.setModel(this.oModel, "test");

// oModelDataUpdated is any oModel you want to set.
this.oModel.setData(oModelDataUpdated);

Best regards,
Jorge.

former_member572766
Discoverer
0 Kudos

Hi, do you solved problem ?