FusionCharts - Dynamic Tooltips using Macros in maps

Created using FusionCharts Suite XT - www.fusioncharts.com

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/maps/fusioncharts.usa.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<!-- 
Dynamic tool-tips on entities and markers using macros.

    Attributes:
        1. entityToolText
        2. markerToolText
    Macros Used :
        1. $lName
        2. $dataValue
        3. $label
-->
<div id="chart-container">FusionCharts will render here</div>

JavaScript

FusionCharts.ready(function () {
    var salesMap = new FusionCharts({
        type: 'usa',
        renderAt: 'chart-container',
        width: '600',
        height: '400',
        dataFormat: 'json',
        dataSource: {
            "chart": {                
                "caption": "Annual Sales by State",
                "subcaption": "Last year",                                                                                                
                "numberPrefix": "$",
                "markerFillColor": "#ffffff",
                "markerBorderAlpha": "0",
                "showMarkerLabels": "0",
                
                //Macros used to build dynamic tool-tips
                "entityToolText": "<div id='nameDiv' style='font-size: 14px; border-bottom: 1px dashed #666666; font-weight:bold; color:#ff0000; padding-bottom: 3px; margin-bottom: 5px; display: inline-block;'>$lName :</div>{br}RevenuetoolTexttaValue</b>",
                "markerToolText": "Region Head: $label",
                "theme": "fint",
                "showLabels": "1",
                "entityFillHoverColor": "#cccccc"
            },
            "colorrange": {
                "minvalue": "0",
                "startlabel": "Low",
                "endlabel": "High",
                "code": "#e44a00",
                "gradient": "1",
                "color": [
                    {
                        "maxvalue": "56580000",
                        "displayvalue": "Average",
                        "code": "#f8bd19"
                    },
                    {
                        "maxvalue": "97400000",
                        "code": "#6baa01"
                    }
                ]
            },
            "data": [
                {
                    "id": "HI",
                    "value": "3189000"
                },
                {
                    "id": "DC",
                    "value": "2879000"
                },
                {
                  ...