# How to make your first JavaScript chart with JSCharting

**URL:** <https://forum.freecodecamp.org/t/how-to-make-your-first-javascript-chart-with-jscharting/656918>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [December 20, 2023, 7:48pm UTC](https://forum.freecodecamp.org/t/how-to-make-your-first-javascript-chart-with-jscharting/656918 "2023-12-20T19:48:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pythonadventurer](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pythonadventurer/32/160747_2.png) [@pythonadventurer](https://forum.freecodecamp.org/u/pythonadventurer)\
**Post date:** [December 20, 2023, 7:48pm UTC](https://forum.freecodecamp.org/t/how-to-make-your-first-javascript-chart-with-jscharting/656918/1 "2023-12-20T19:48:26Z")

</div>

Hello. I completed this tutorial ([How to make your first JavaScript chart with JSCharting](https://www.freecodecamp.org/news/how-to-make-your-first-javascript-chart/)) up to Step 2. When I refreshed my browser to view the bar chart, I got a “spinning ball”. I opened Chrome Developer Tools, and there is an error in `jscharting.js` : `Uncaught TypeError: 1.indexOf is not a function.` I Googled this issue and didn’t see anyone else who experienced this. Screenshot below. Am I doing something wrong here?

Thanks for your help. 🙂

 ![jscharting-bug](https://global.discourse-cdn.com/freecodecamp/original/4X/d/9/e/d9e22dbfadbe78aa34e884be65e5097318970d3f.jpeg)

---

<div class="post-metadata">

**Author:** ![lasjorg](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lasjorg/32/280761_2.png) [@lasjorg](https://forum.freecodecamp.org/u/lasjorg)\
**Post date:** [December 21, 2023, 1:24am UTC](https://forum.freecodecamp.org/t/how-to-make-your-first-javascript-chart-with-jscharting/656918/2 "2023-12-21T01:24:08Z")

</div>

We need to see your code, not the library code.

---

<div class="post-metadata">

**Author:** ![ArielLeslie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/arielleslie/32/264841_2.png) [@ArielLeslie](https://forum.freecodecamp.org/u/ArielLeslie)\
**Post date:** [December 21, 2023, 4:25pm UTC](https://forum.freecodecamp.org/t/how-to-make-your-first-javascript-chart-with-jscharting/656918/3 "2023-12-21T16:25:53Z")

</div>

Without code, all we can do is help you interpret the error. It looks like somewhere you called `indexof`on a number instead of an array. Perhaps you called it on the index of an array by accident?

---

<div class="post-metadata">

**Author:** ![pythonadventurer](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pythonadventurer/32/160747_2.png) [@pythonadventurer](https://forum.freecodecamp.org/u/pythonadventurer)\
**Post date:** [December 22, 2023, 2:52am UTC](https://forum.freecodecamp.org/t/how-to-make-your-first-javascript-chart-with-jscharting/656918/4 "2023-12-22T02:52:14Z")

</div>

Thank you. I’ll look into that.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [June 21, 2024, 2:52pm UTC](https://forum.freecodecamp.org/t/how-to-make-your-first-javascript-chart-with-jscharting/656918/5 "2024-06-21T14:52:41Z")

</div>

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