 <p>it's an array, not a string, so just give it the array of points:</p> <pre><code>... var points = []; $(this).children("input").each(function(index) { points[index] = $(this).val(); }); var plot1 = $.jqplot('chart1',[points]); </code></pre> <p>updated fiddle: <a href="http://jsfiddle.net/fdKRw/4/" rel="nofollow">http://jsfiddle.net/fdKRw/4/</a></p>