Accepted answer

1) remove all extra commas (see: in general use jslints or jshints (in jsfiddle) to make your code a little better.

2) define function in that way: drawchart = function() { //set it global example:

3) i advice to create simple container (array for example), and when you will drop element add that element to that container. then you will be able pretty fast look through that array and od something with that items.

Related Query

More Query from same tag