Skip to Content
0

Binding columns in micro chart

Apr 12, 2017 at 02:06 PM

112

avatar image

I have the following XML snippet

<GenericTile header="Revenue Dynamics" frameType="OneByOne" press="press">
<tileContent>
<TileContent footer="Column chart">
<content>
<mc:ColumnMicroChart columns="{/results}">
<mc:columns>
<mc:ColumnMicroChartData value="{value}" color="{color}"/>
</mc:columns>
</mc:ColumnMicroChart>
</content>
</TileContent>
</tileContent>
</GenericTile>

Trying to bind columns to a json dummy data

{
"results": [{
"value": "100",
"label": "January",
"color": "Critical"
}, {
"value": "300",
"label": "February",
"color": "Neutral"
}, {
"value": "200",
"label": "March",
"color": "Neutral"
}]
}

Regards

Bobu Putheeckal

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
BobuGeorge P Apr 12, 2017 at 04:17 PM
0

Had to use the formatted (float) for value

<mc:ColumnMicroChart columns="{/results}" >
<mc:columns>
<mc:ColumnMicroChartData value ="{parts:['value'],formatter:'.formatFloat'}" label="{label}" color="{color}"/>
</mc:columns>
</mc:ColumnMicroChart>
formatFloat: function(param){
return parseFloat(param);
}
Share
10 |10000 characters needed characters left characters exceeded
Srikanth KV Apr 12, 2017 at 03:37 PM
0

what is the issue here....?? you have the binding ..then??

Share
10 |10000 characters needed characters left characters exceeded