-1

http://jsfiddle.net/pkb9ovLa/

I am creating a HighMap for the US. When I run my code, I do not get any output. Why is this?

$(function () {

        $.getJSON('http://localhost:52149/Scripts/BrokerInfo.json', function (data) {
         $('#container').highcharts('Map', {

        chart : {
            borderWidth : 1
        },

        title : {
            text : 'Broker Zonal Assignment'
        },
        mapNavigation: {
            enabled: true
        },

                series : [{
            animation: {
                duration: 1000
            },
            data : data,
            mapData: Highcharts.maps['countries/us/us-all'],
            joinBy: ['State', 'State'],
            dataLabels: {
                enabled: true,
                color: 'white',
                format: '{point.State}'
            },
            name: 'Vice President',
            tooltip: {
                pointFormat: '{point.state}: {point.VicePresident}'
            }
        }]
    });
});

1 Answers1

1

Uncaught ReferenceError: Highcharts is not defined

The order is wrong, you can not load dependancies of highcharts before you load the main file.

<script type="text/javascript" src="http://code.highcharts.com/mapdata/countries/us/us-all-all.js"></script>

needs to come after the highmaps.js include

epascarello
  • 204,599
  • 20
  • 195
  • 236