on 06-24-2018 8:45 PM
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"]
}
});
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, do you solved problem ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.