Maximum call stack size exceeded


i’m kinda new with ploty.js
has anyone got this kind of warning.
i got it when trying to make a line graft.
here’s the code that i’m using.

is there something wrong with the code that i wrote ?


@nmdickys thanks for using plotly.
I can’t see a link to your code!
Would you please paste the code again?

This error is almost always means you have a problem with recursion in JavaScript code, as there isn’t any other way in JavaScript to consume lots of stack. Sometimes calling a recursive function over and over again, causes the browser to send you Maximum call stack size exceeded error message as the memory that can be allocated for your use is not unlimited. The solution is to wrap your recursive function call into a -

  • setTimeout
  • setImmediate or
  • process.nextTick

Also, you can localize the issue by setting a breakpoint on RangeError type of exception , and then adjust the code appropriately.