Skip Overlap Labels in PieCharts

247787

by Nabajeet Sonowal

HTML

<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.charts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<body>
    <div id="chartContainer">FusionCharts XT will load here!</div>
</body>

JavaScript

FusionCharts.ready(function () {
    var demographicsChart = new FusionCharts({
        type: 'pie3d',
        renderAt: 'chartContainer',
        width: '400',
        height: '280',
        dataFormat: 'json',
        dataSource: {
            "chart": {
                "caption": "Age profile of website visitors",
                    "subCaption": "Last Year",
                    "startingAngle": "120",
                    "showLabels": "0",
                    "showLegend": "1",
                    "enableMultiSlicing": "0",
                    "enableSmartLabels": "1",
                    "slicingDistance": "15",
                //To show the values in percentage
                "showPercentValues": "1",
                    "showPercentInTooltip": "0",
                    "showPercentValues": "0",
                    "plotTooltext": "Age group : $label<br>Total visit : $datavalue",
                    "theme": "fint",
                    "skipOverlapLabels": "0"
            },
                "data": [{
                "label": "429432",
                    "value": "321"
            }, {
                "label": "429434",
                    "value": "432"
            }, {
                "label": "429430",
                    "value": "7456"
            }, {
                "label": "18036134",
                    "value": "80"
            }, {
                "label": "6012046",
                    "value": "22"
            }, {
                "label": "4294321",
                    "value": "3080"
            }, {
                "label": "3435449",
                    "value": "8080"
            }, {
                "label": "3006021",
                    "value": "3563"
            }, {
                "label": "2147149",
                    "value": "133"
            }, {
                "label": "1717732",
                    "value": "423"
            }, {
                "label": "1717727",
                    "value": "3213"
            }, {
    ...