cancel
Showing results for 
Search instead for 
Did you mean: 

​Analytical Integration card loses data when binding to model

Tristan
Participant
0 Kudos
239

Hi Experts,

I’m trying to work with ui Intgreation cards and copied this sample. (https://ui5.sap.com/test-resources/sap/ui/integration/demokit/cardExplorer/webapp/index.html#/explor...)

When providing the data trough the data{ json : […]} section my card works as expected.

When changing the path (as well as measure and dimension) definition to read from my named model, the card breaks and displays the loading animation. Even though, this configuration works fine for e.g my table and list card.

When debugging and having both properties, the json and path section, in place, I can see while debugging that the _createChart method gets called on the AnalyticalContent-dbg.js. But this fails because ‘this.getBindingContext()’ is undefined, but expected to be set, to call ‘this.getBindingContext().getPath()’ in the _getDataset Method.
Before those methods get called you can see the sample data is correctly loaded in the oResolvedConfiguration object.

When removing the json property again, I thought my code would be correct, but then the ‘_createChart’ Method is not called at all and the result is the same as picture number 2. Other cards work even with the json and path property inplace.


Does anybody have an idea what’s going on here and where I could be wrong?

Best Regards,

Tristan

************************************************

Code can be found here in the provided Branches: https://github.com/JanTristanH/repo-for-sap-question

Edit: I tried the same steps with a Line chart and got the same behavoir.

Config for my analytical Donut card.

"donut": { "sap.app": { "id": "sample.CardsLayout.model.donut", "type": "card" }, "sap.card": { "type": "Analytical", "content": { "chartType": "Donut", "legend": { "visible": true, "position": "Right", "alignment": "Center" }, "plotArea": { "dataLabel": { "visible": true, "showTotal": true } }, "title": { "visible": false }, "measureAxis": "size", "dimensionAxis": "color", "data": { "json":{}, "path": "co2popover>/emissionDetails" }, "dimensions": [{ "label": "Measure Name", "value": "{co2popover>description}" }], "measures": [{ "label": "Value", "value": "{co2popover>co2eAmount}" }] } } },

Accepted Solutions (0)

Answers (0)