tcetin
tcetin

Reputation: 1089

TypeError: a is undefined Highmaps

I am trying to create highmaps but I am getting this error:

TypeError: a is undefined           highmaps.js:11:348

This seems javaScript library(highmaps) loading problem but I couldnt solve.

How can we solve this issue?

Here My Codes:

$('#container').highcharts('Map', {

        title : {
            text : ''
        },

        subtitle : {
            text : ''
        },

        mapNavigation: {
            enabled: true,
            buttonOptions: {
                verticalAlign: 'bottom'
            }
        },

        credits:false,

        colorAxis: {
                min: 0,
                minColor: '#ffb899',
                stops: [
                    [0, '#ff9966'],
                    [0.67, '#c9433f'],
                    [1, '#7e3045']
                ]
        },
        series : [{
         data : [{
                    "hc-key": "tr-aa",
                    "value": 190.00,
                    "indikator_id":138,
                    "indikator_id":138,
                    "donem":"2015-4.Dönem",
                    "city":1
               }],
            mapData: Highcharts.maps['countries/tr/tr-all'],
            joinBy: 'hc-key',
            name: 'İndikatör Toplam Değeri',
            point:{
                events:{
                    click:function(){

                        $('div#mapModal').modal();

                        $.ajax({
                            type:'POST',
                            url:'ajax/map_data_ajax.php',
                            data:this.options,
                            success:function(res){
                                $('div#mapData').html(res);

                                console.log(res);

                            }
                        });
                    }
                }
            },
            borderColor: '#fff',
            borderWidth: 1.2,
            states: {
                hover: {
                    color: '#0086ff'
                }
            },
            dataLabels: {
                enabled: true,
                format: '{point.name}',
                color:'#fff'
            }
        }]
    });

Here is jsfiddle.

You will see this error on fiddle:

Uncaught TypeError: Cannot read property 'indexOf' of undefined

How can we solve this issue?

Thanks

Upvotes: 0

Views: 849

Answers (1)

tcetin
tcetin

Reputation: 1089

I got it simple mistake.Normally doesnt exists any error about javascript loading. Error is about credits.

It is not credits:false. It will like this:

credits:{
   enabled:false
}

Now this is working:jsfiddle

Thanks anyway.

Upvotes: 2

Related Questions