FusionCharts - Global population map by continent - Custom Entity IDs

Created using FusionCharts Suite XT - www.fusioncharts.com

by Ashok Kumaresan

HTML

<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.maps.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<script src="http://static.fusioncharts.com/code/latest/maps/fusioncharts.world.js"></script>
<!-- 
World population map using legend with icons, indicating fixed data range. This example shows how custom entities can be defined and used
-->
<div id="chart-container">FusionCharts will render here</div>

JavaScript

FusionCharts.ready(function () {
     populationMap = new FusionCharts({
        type: 'world',
        renderAt: 'chart-container',
        width: '600',
        height: '400',
        dataFormat: 'json',
        dataSource: {
            "chart": {
                "caption": "Global Population",                
                "theme": "fint",
                "formatNumberScale":"0",
                "numberSuffix":"M",
                "showLabels": "1",
                "useSNameInToolTip":"1",
                "useSNameInLabels": "1"
            },
            "entityDef":  [
                  {
                    "internalId": "NA",
                    "newId": "NAM"
                    
                  },
                  {
                    "internalId": "SA",
                    "newId": "SAM"
            
                  },
                  {
                    "internalId": "EU",
                    "newId": "EUR"
                  },
                  {
                    "internalId": "AS",
                    "newId": "ASI"
                  },
                  {
                    "internalId": "AF",
                    "newId": "AFR"
                  },
                  {
                    "internalId": "AU",
                    "newId": "AUS"
                  }
                ],
             "colorrange": {
                "color": [
                    {
                        "minvalue": "0",
                        "maxvalue": "100",
                        "code": "#D1D9C5",
                        "displayValue" : "< 100M"
                    },
                    {
                        "minvalue": "100",                        
                        "maxvalue": "500",                        
                        "code": "#C9DEA9",
                        "displayValue" : "100-500M"
                    },
                    {
                        "minvalue": "500",                        
                       ...