How to fix RangeError


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
Hello everyone,
I am working on a project, in Angular 2 and I want to display a line chart with data that I get from a mysql database.
I have three ticket-types that I am accesing trought the count variable(String): anzahlfirst,anzahlsecond,anzahlcritical
There I am calling the functions, which I defined in cockpit.component.ts.
However,when I run the app on localhost in the browser I am getting this error and the page is loading…
I was researching on this but I still don’t quite understand where the problem lies and how can I manage this issue.

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

vendor.bundle.js:5700 ERROR Error: Uncaught (in promise): RangeError: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
at callWithDebugContext (core.es5.js:13472)
at Object.debugCreateComponentView [as createComponentView] (core.es5.js:12822)
at createViewNodes (core.es5.js:12157)
at callViewAction (core.es5.js:12633)
at execComponentViewsAction (core.es5.js:12542)
at createViewNodes (core.es5.js:12214)
at callViewAction (core.es5.js:12633)
at execComponentViewsAction (core.es5.js:12542)
at createViewNodes (core.es5.js:12214)
at callViewAction (core.es5.js:12633)
at callWithDebugContext (core.es5.js:13472)
at Object.debugCreateComponentView [as createComponentView] (core.es5.js:12822)
at createViewNodes (core.es5.js:12157)
at callViewAction (core.es5.js:12633)
at execComponentViewsAction (core.es5.js:12542)
at createViewNodes (core.es5.js:12214)
at callViewAction (core.es5.js:12633)
at execComponentViewsAction (core.es5.js:12542)
at createViewNodes (core.es5.js:12214)
at callViewAction (core.es5.js:12633)
at resolvePromise (zone.js:783)
at resolvePromise (zone.js:754)
at zone.js:831
at ZoneDelegate.invokeTask (zone.js:424)
at Object.onInvokeTask (core.es5.js:3881)
at ZoneDelegate.invokeTask (zone.js:423)
at Zone.runTask (zone.js:191)
at drainMicroTaskQueue (zone.js:595)
at

```
    <div class="col-md-1">
      
    </div>
    <div class="col-md-5">  
      <canvas baseChart height="200" [datasets]="lineChartData" [labels]="lineChartLabels" [options]="options" [colors]="lineChartColors"    
        [legend]="lineChartLegend" [chartType]="lineChartType" >
       <cockpit-component count="anzahlfirst" (anzahlChanger)="changeAnzahlFirst($event)"></cockpit-component>
        <cockpit-component count="anzahlsecond" (anzahlChanger)="changeAnzahlSecond($event)"></cockpit-component>
         <cockpit-component count="anzahlcritical" (anzahlChanger)="changeAnzahlCritical($event)"></cockpit-component>
        </canvas>
    </div>
<do not remove the three backticks above>

#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.