Highcharts工具提示格式化器返回函数抛出未捕获的TypeError: j.i call不是函数
Highcharts tooltips formatter return function throwing Uncaught TypeError: j.call is not a function
我们在其中一个模块中使用了Highcharts,我们希望在指针移动到饼图切片上时显示工具提示。
$(function () {
$('#container').highcharts({
chart: {
renderTo: 'container',
type: 'pie'
},
colors: [
'#ff6600',
'#333300',
'#660000'],
credits: {
enabled: false
},
title: {
text: ''
},
yAxis: {
title: {
text: 'Total percent market share'
}
},
plotOptions: {
series: {
states: {
hover: {
enabled: false
}
}
}
},
tooltip: {
formatter:function () {return '<b>' + this.point.name + '<'/b>';},
shared:true,
headerFormat:"<span style='"padding:0'">{point.key}: <b{point.percentage:.1f}%<'/b><'/span><br>",
valueDecimals:2,
useHTML:true,
pointFormat:"<span style='"padding:0'">Count : <b>{point.y:.0f}<'/b>",
enabled:true,
footerFormat:"<'/span>"
},
series: [{
name: 'Time',
data: [
["sleep", 10],
["work", 30],
["play", 10]
],
dataLabels: {
enabled: false
}
}]
});
});
但是控制台抛出Uncaught TypeError: j.call is not a function错误。如果我们在http://jsfiddle.net/中运行相同的代码,那么它会像预期的那样工作。
尝试使用
var chart = new Highcharts.Chart({
不是$('#container').highcharts({
示例:http://jsfiddle.net/gh/get/jquery/1.7.2/hililide-software/highcharts.com/tree/master/samples/highcharts/chart/renderto-object/
相关文章:
- TypeError:_this.store.getState在使用来自Redux的连接时不是函数
- Uncaught TypeError:undefined不是函数-ember js
- 试图将onChange函数作为道具传递给GrandChlidren,结果是TypeError:这是未定义的
- Mongoose TypeError:实例化模式类型的对象时,对象不是函数
- jQuery使用ajax自动完成问题-TypeError:this.source不是函数
- TypeError:this.getAttribute不是一个函数-javascript
- poster typeerror用户不是函数
- TypeError:t(..).on不是fullcalendar上的函数
- jQuery$.post TypeError:e.type不是函数
- TypeError:执行回调时,回调不是函数
- Dojo:TypeError:marketStore.query不是函数
- 未能运行构造函数:TypeError:对象#<对象>没有方法'addPlugin'
- 尝试使用.ninnerHTMLlog打印数据,获取错误Uncaught TypeError:undefined不是函数
- 我收到此错误Uncatch TypeError:this.getElements不是一个函数
- Getting TypeError:$(..).datetimepicker不是函数
- TypeError:socket.emit不是函数
- node.js中的回调函数.TypeError: Cannot call method 'emit'的定
- 调用javascript函数TypeError时出错:i.contentWindow.hiform不是函数
- Javascript 函数 TypeError 但只在 substring() 字符串上
- JS:你的函数不是一个函数!TypeError