FusionCharts - Pyramid Chart - Basic Sample

Created using FusionCharts Suite XT - www.fusioncharts.com

by mhctoledo

HTML

<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.widgets.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<!-- A Simple Pyramid chart showing distribution of Global Wealth against the % of World population -->
<div id="chart-container">FusionCharts will render here</div>

JavaScript

FusionCharts.ready(function () {
    var wealthChart = new FusionCharts({
        type: 'pyramid',
        renderAt: 'chart-container',
        id: 'wealth-pyramid-chart',
        width: '500',
        height: '400',
        dataFormat: 'json',
        dataSource: {
            "chart": {
                "bgcolor": "CCCCCC,FFFFFF",
                "caption": "Population Distribution",
                "basefontcolor": "333333",
                "decimals": "0",
                "numbersuffix": "",
                "pyramidyscale": "40",
                "chartbottommargin": "0",
                "captionpadding": "0",
                "showborder": "0"
            },
            "data": [
                {
                    "label": "",
                    "value": "29"
                },
                {
                    "label": "",
                    "value": "10"
                },
                {
                    "label": "",
                    "value": "50"
                }
            ]
        }  
    })
    
    .render();
});