gpt4 book ai didi

javascript - 类型错误 : a is undefined Highmaps

转载 作者:行者123 更新时间:2023-12-02 15:03:15 26 4
gpt4 key购买 nike

我正在尝试创建 Highcharts ,但收到此错误:

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

这似乎是 javaScript 库(highmaps)加载问题,但我无法解决。

我们如何解决这个问题?

这是我的代码:

$('#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'
}
}]
});

这里是jsfiddle .

您将在 fiddle 上看到此错误:

Uncaught TypeError: Cannot read property 'indexOf' of undefined

我们如何解决这个问题?

谢谢

最佳答案

我犯了一个简单的错误。通常不存在任何关于 javascript 加载的错误。错误与学分有关。

这不是credits:false。它会像这样:

credits:{
enabled:false
}

现在可以运行了:jsfiddle

无论如何,谢谢。

关于javascript - 类型错误 : a is undefined Highmaps,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35311387/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com