highcharts treemap stack Uncaught RangeError : Maximum call stack size exceeded
highcharts treemap stack Uncaught RangeError : Maximum call stack size exceeded
我正在尝试使用 highchart.js 创建树状图。我正在做类似的事情 https://jsfiddle.net/mushigh/8wmugzx2/?utm_source=website&utm_medium=embed&utm_campaign=8wmugzx2
我的代码:
$(function() {
// Create the chart
$('#container').highcharts({
xAxis: {
// Avoid data module setting axis type to category.
type: 'linear'
},
series: [{
type: "treemap",
layoutAlgorithm: 'strip',
alternateStartingDirection: true,
levels: [{
level: 1,
layoutAlgorithm: 'strip',
dataLabels: {
enabled: true,
align: 'left',
verticalAlign: 'top',
style: {
fontSize: '13px',
fontWeight: 'bold'
}
}
}]
}],
title: {
text: 'Chart title'
},
data: {
googleSpreadsheetKey: '1CSSXuFN5lJJedAS7RO-8HkL2VNi_ljtsly5Cnq04V6M',
seriesMapping: [{
id: 1,
name: 1,
value: 2,
parent: 3,
color: 4
}]
}
});
});
当我使用 jsfiddle 中提供的数据时,它没有任何错误。但是,如果我用我的替换源数据,它会抛出范围错误。代码与示例几乎相同。我只是用我的 googlesheets 数据更改 Googlesheets 令牌。
Link 到示例中的数据源:https://docs.google.com/spreadsheets/d/1wYm5waQmiYKGhtdofvXDS8SHdh72Mwcnygvf3bvFfoU/edit#gid=0
Link 到我的数据源:
https://docs.google.com/spreadsheets/d/1CSSXuFN5lJJedAS7RO-8HkL2VNi_ljtsly5Cnq04V6M/edit#gid=0
我无法调试这个问题。感谢任何帮助。
谢谢:)
错误日志:
[Error] RangeError: Maximum call stack size exceeded.
toLength (highcharts.js:29:85)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
您的电子表格的 child 和 parent 列的最后一行似乎都有 Multiple Bias Incidents
。
这就是我认为的问题所在,因为树构建可能是递归的,并且当 child 引用自身时,它可能会尝试一遍又一遍地渲染。你能试试吗,然后告诉我。
您可以查看这些证明这一点的示例小提琴
MAX STACK ERROR(这里的一个条目 Anne
具有 parent 和 id 相同的值)
NO ERROR(这里没有重复)
我正在尝试使用 highchart.js 创建树状图。我正在做类似的事情 https://jsfiddle.net/mushigh/8wmugzx2/?utm_source=website&utm_medium=embed&utm_campaign=8wmugzx2
我的代码:
$(function() {
// Create the chart
$('#container').highcharts({
xAxis: {
// Avoid data module setting axis type to category.
type: 'linear'
},
series: [{
type: "treemap",
layoutAlgorithm: 'strip',
alternateStartingDirection: true,
levels: [{
level: 1,
layoutAlgorithm: 'strip',
dataLabels: {
enabled: true,
align: 'left',
verticalAlign: 'top',
style: {
fontSize: '13px',
fontWeight: 'bold'
}
}
}]
}],
title: {
text: 'Chart title'
},
data: {
googleSpreadsheetKey: '1CSSXuFN5lJJedAS7RO-8HkL2VNi_ljtsly5Cnq04V6M',
seriesMapping: [{
id: 1,
name: 1,
value: 2,
parent: 3,
color: 4
}]
}
});
});
当我使用 jsfiddle 中提供的数据时,它没有任何错误。但是,如果我用我的替换源数据,它会抛出范围错误。代码与示例几乎相同。我只是用我的 googlesheets 数据更改 Googlesheets 令牌。
Link 到示例中的数据源:https://docs.google.com/spreadsheets/d/1wYm5waQmiYKGhtdofvXDS8SHdh72Mwcnygvf3bvFfoU/edit#gid=0
Link 到我的数据源: https://docs.google.com/spreadsheets/d/1CSSXuFN5lJJedAS7RO-8HkL2VNi_ljtsly5Cnq04V6M/edit#gid=0
我无法调试这个问题。感谢任何帮助。
谢谢:)
错误日志:
[Error] RangeError: Maximum call stack size exceeded.
toLength (highcharts.js:29:85)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
(anonymous function) (treemap.js:15:220)
forEach
each (highcharts.js:29:85)
buildNode (treemap.js:15:185)
您的电子表格的 child 和 parent 列的最后一行似乎都有 Multiple Bias Incidents
。
这就是我认为的问题所在,因为树构建可能是递归的,并且当 child 引用自身时,它可能会尝试一遍又一遍地渲染。你能试试吗,然后告诉我。
您可以查看这些证明这一点的示例小提琴
MAX STACK ERROR(这里的一个条目 Anne
具有 parent 和 id 相同的值)
NO ERROR(这里没有重复)