FusionCharts - Number formatter - Formatting numbers outside chart

Created using FusionCharts Suite XT - www.fusioncharts.com

by Vividh Chandna

HTML

<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.powercharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<!-- Number formatter - Extracting native data from the chart and feeding them to the table below the chart. The button formats the native data based numbers in the table to match the number format used in the chart. -->


<div id="chart-container">FusionCharts will render here</div>

JavaScript

FusionCharts.ready(function () {
    var inventoryChart = new FusionCharts({
        type: 'dragcolumn2d',
        renderAt: 'chart-container',
        id: "fc",
        width: '500',
        height: '350',
        dataFormat: 'json',
        dataSource: {
            "chart": {
                "caption": "Inventory status - Bakersfield Central",                
                "subCaption": "Top 5 Food items",
                "xAxisName": "Food Item",
                "yAxisName": "No. of Units",
                "showRestoreBtn": "0",
                "allowAxisChange": "0",
                "theme": "fint"
            },
            "categories": [
                {
                    "category": [
                        {
                            "label": "Poultry"
                        }, 
                        {
                            "label": "Rice"
                        }, 
                        {
                            "label": "Peanut Butter"
                        }, 
                        {
                            "label": "Salmon"
                        }, 
                        {
                            "label": "Cereal"
                        }
                    ]
                }
            ],
            "dataset": [
                {
                    "seriesname": "Available Stock",
                    "allowDrag": "0",
                    "data": [
                        {
                            "id": "P_AS",
                            "value": "6000"
                        }, 
                        {
                            "id": "R_AS",                            
                            "value": "9500"
                        }, 
                        {
                            "id": "PB_AS",
                            "value": "11900"
                        }, 
                        {
                            "id": "S_AS",
                            "value": "8000"
    ...