Skip to Content
0
Former Member
Aug 17, 2015 at 07:15 AM

Issue with ColumnMicroChart binding

171 Views

I have a OData Service in a SAP Backend which produces the following JSON output:

{
"d" : {
"ContractNumber" : "0000010000850",
"ContractCapital" : "150000.00",
"ContractCurrency" : "EUR",
"ProductTypeText" : "Hypothekendarlehen",
"Installment" : "1730.0000000",
"InstallmentUnit" : "EUR",
"Interest" : "3.5000000",
"DisbursementObligation" : "85000.00",
"DateOfNextPayment" : "\/Date(1440979200000)\/",
"AmountOfNextPayment" : "1881.67",
"PartnerNumber" : "1000000863",
"PartnerRoleText" : "Hauptdarlehenspartner",
"LanguageKey" : "DE",
"ContractToAmountSums" : {
"results" : [
{
"ContractNumber" : "0000010000850",
"AmountType" : "REP",
"AmountSum" : "3460.00"
},
{
"ContractNumber" : "0000010000850",
"AmountType" : "INT",
"AmountSum" : "341.25"
},
{
"ContractNumber" : "0000010000850",
"AmountType" : "FEE",
"AmountSum" : "1560.00"
}
]
}
}
}


The binding in the controller is as follows:


var sContractPath = "/" + oEvent.getParameter("arguments").contract + "?$expand=ContractToAmountSums";

var oHeaderContainer = this.getView().byId("headercontainer");

oHeaderContainer.bindElement(sContractPath);


And this ist the corresponding view part:

<suite:ColumnMicroChart

columns="{ContractToAmountSums}"

size="M">

<suite:columns>

<suite:ColumnData value="{/AmountSum}" label="{AmountType}" color="Error"/>

</suite:columns>

</suite:ColumnMicroChart>


The problem is - it does not work. With the above mentioned version I get three columns in the chart and the correct label but all amounts are 0. If I leave the "/" before "AmountSum" I only get one column and no labels. If I add a "/" before "AmountType" I get three columns with no label. This is totally strange. How can I get the correct amounts in the chart instead of 0? And why seems to be a difference regarding the "/" though the two properties are in the exact same position of the model?


It would be nice if someone could bring a bit light into the issue...