2017-12-09 21 views
0

highchart.js를 사용하여 트리 차트를 만들려고합니다.highcharts treemap stack 잡히지 RangeError : 최대 호출 스택 크기가 초과되었습니다

$(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에서 제공하는 데이터를 사용하는 경우,이 오류없이 작동 :이 https://jsfiddle.net/mushigh/8wmugzx2/?utm_source=website&utm_medium=embed&utm_campaign=8wmugzx2

내 코드와 유사한 일을하고 있습니다. 그러나 원본 데이터를 광산으로 바꾸면 범위 오류가 발생합니다. 코드는 예제와 거의 같습니다. Google Googlesheets 데이터로 Googlesheets 토큰을 변경하고 있습니다. 예제에서 데이터 소스에

링크 : 내 데이터 소스에 https://docs.google.com/spreadsheets/d/1wYm5waQmiYKGhtdofvXDS8SHdh72Mwcnygvf3bvFfoU/edit#gid=0

링크 : 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) 

답변

1

스프레드 시트가 두 자녀와 부모 열의 마지막 행에 Multiple Bias Incidents을 갖고있는 것 같다.

이것은 트리 구조가 재귀적일 수 있고 자식이 스스로를 참조 할 때 반복해서 렌더링하려고 할 수 있기 때문에 문제가 있다고 생각합니다. 그걸 시도하고 알려주실 수 있습니까?

당신은 점

MAX STACK ERROR 증명 이러한 샘플 바이올린 확인할 수 있습니다 (의 여기에 하나를 항목 Anne는 같은 값으로 부모와 ID를 가지고)

NO ERROR (여기서 그러한 반복이없는)

+0

을 감사합니다 Nandu, 실제로 문제가되었습니다. 나는 부모를 제거하고 그것을 작동합니다. 감사 :) –