Skip to Content

Binding columns in micro chart

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 12, 2017 at 04:17 PM

    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);
    }
    Add comment
    10|10000 characters needed characters exceeded

  • Apr 12, 2017 at 03:37 PM

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

    Add comment
    10|10000 characters needed characters exceeded