on 03-20-2018 1:25 PM
I have bound JSONModel
with sap.suite.ui.microchart.AreaMicroChart
control to show points in lines aggregation
but chart is not rendering.
Plese tell me whats wrong in below XML
code:
<micro:AreaMicroChart lines="{/}" id="areaMicroChart" isResponsive="true" minXValue="0" app:name="area" maxXValue="12" minYValue="0" maxYValue="999999" colorPalette="#b6d957" press="press">
<micro:firstXLabel>
<micro:AreaMicroChartLabel label="Jan" />
</micro:firstXLabel>
<micro:lastXLabel>
<micro:AreaMicroChartLabel label="Dec" />
</micro:lastXLabel>
<micro:firstYLabel>
<micro:AreaMicroChartLabel label="" color="Good" />
</micro:firstYLabel>
<micro:lastYLabel>
<micro:AreaMicroChartLabel label="" />
</micro:lastYLabel>
<micro:lines>
<micro:AreaMicroChartItem points="{path: 'aPrev', templateShareable: 'true' }">
<micro:points>
<micro:AreaMicroChartPoint x="{a}" y="{ZtotalSales}" />
</micro:points>
</micro:AreaMicroChartItem>
</micro:lines>
</micro:AreaMicroChart>
JS Code:
onInit: function() {
var aPrevMonths = [{
ZtotalSales: "2123",
a: "1"
}, {
ZtotalSales: "55545",
a: "2"
}, {
ZtotalSales: "34342",
a: "3"
}];
var oModel = new JSONModel({
aPrev: aPrevMonths
});
this.byId("areaMicroChart").setModel(oModel);
}
User | Count |
---|---|
83 | |
10 | |
10 | |
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.