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: b.normalized[g].forEach is not a function

See original GitHub issue

Trying out Chartist by cloning master branch and using *.min.js and *.min.css in my code, while following http://gionkunz.github.io/chartist-js/getting-started.html . And I get the error

TypeError: b.normalized[g].forEach is not a function

Reproduced on Safari/Firefox/Chrome.

What am I doing wrong?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6

github_iconTop GitHub Comments

11reactions
LaxisBcommented, Aug 7, 2015

i managed to stumble on this issue too.

it happens, if the chart series is a 1-dimensional array instead of a two-dimensional one

here’s a codepen with the error: http://codepen.io/laxis/pen/eNxaJJ?editors=001
jsbin: http://jsbin.com/vebegeyeki/1/edit?html,js,console,output debugger screenshot:

hope it helps 😃

5reactions
gionkunzcommented, Aug 7, 2015

Thanks for reproducting on jsbin! This make things a lot easier 😃

Series should always be an array of arrays! It’s an array of data series.

http://jsbin.com/cuxama/edit?html,js,console,output

Cheers Gion

Read more comments on GitHub >

github_iconTop Results From Across the Web

I am getting TypeError saying forEach is not a function?
I think the issue is related to javascript/reactjs and not chartist.js ... which is something like data.normalized[seriesIndex].forEach is ...
Read more >
TypeError: forEach is not a function in JavaScript
The "TypeError: forEach is not a function" error is thrown when the code attempts to call the forEach() method on a value that...
Read more >
How to fix TypeError: forEach is not a function in JavaScript?
TypeError occurs when we try to access a method or a property from a variable whose type does not have that method or...
Read more >
4.2 "TypeError: arrayName.forEach is not a function"
I passed the exercise with the following, without forEach: String.prototype.rotate = function(n) { // n is an integer n %= this.length; ...
Read more >
TypeError: moduleDecl.body.body.forEach is not a function ...
Hi! I have a strange error TypeError: moduleDecl.body.body.forEach is not a function Occurred while linting ...
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