question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 'ToString' of undefined when bar chart is rendering with data.

See original GitHub issue

Codepen: https://codepen.io/jfalter/pen/rNedKOw

Whenever I attempt to render a bar chart with data, I get the following error message:

Uncaught (in promise) TypeError: Cannot read property 'toString' of undefined at Function.value (apexcharts:6 at t.value (apexcharts:6) at t.value (apexcharts:6) at t.value (apexcharts:14) at t.create (apexcharts:6) at apexcharts:14 at new Promise (<anonymous>) at t.value (apexcharts:14) at apexcharts:6 at Array.forEach (<anonymous>)

When I look at the Apexcharts Javascript file, I see this throwing an error:

key: “escapeString”, value: function(t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : “x” , i = t.toString().slice(); //This is what’s throwing the error. return i = i.replace(/[` ~!@#$%^&*()_|+-=?;:'",.<>{}[]\/]/gi, e) }

Note that it works fine if I render with empty data and category arrays.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
maxi512commented, Sep 10, 2020

I have the same error! I thought that I was the only one.

3reactions
junedchhipacommented, Sep 10, 2020

Thanks for reporting. It’s a major bug and I had to immediately release a patch version as this might have broken many existing charts.

Please upgrade to v3.20.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'toString' of Undefined in JavaScript
The "Cannot read property 'toString' of undefined" error occurs when the toString() method is called on an undefined value. To solve the error,...
Read more >
Why do I get Cannot read property 'toString' of undefined
toString () throws a TypeError. It says string is undefined. I'm not an experienced js developer. Why would this happen? Edit: I call...
Read more >
Codesandbox And Importing Github Repos Built With Vue-Cli
The data object should look. ... TypeError: Cannot read property 'ToString' of undefined when bar chart is rendering with data. #1898. Closed.
Read more >
Uncaught TypeError: Cannot read property of undefined
If you get undefined error, you need to make sure that which ever variables throws undefined error, is assigned a value to it....
Read more >
Cannot read properties of undefined' - JavaScript Debugging
JavaScript Tutorial. How To Fix 'Uncaught TypeError : Cannot read properties of undefined ' - JavaScript Debugging. 26K views 6 months ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found