Solved

Uncaught TypeError: can't read property

Posted on 2016-12-01
1
13 Views
Last Modified: 2016-12-01
I am trying to create a jqplot pie chart but I get the following error:
Uncaught TypeError: Cannot read property 'addItems' of undefined(…)

https://jsfiddle.net/isogunro/5peuchqe/
0
Comment
Question by:Isaac
1 Comment
 
LVL 23

Accepted Solution

by:
Siva Prasanna Kumar earned 500 total points
Comment Utility
Remove window.allItems just use allItems as below.


// alert(	allItems);
 	allItems.addItems("Hello"+i, k);
 }

    chartArray = allItems.getChartData();

Open in new window

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now