Dynamic data input for pie chart
<p>I am getting values from the database to javascript array. Javascript code which I am using to create pie chart with static value is as follows.</p>

<pre><code>        $(function () {
        $('#container').highcharts({
            chart: {
                type: 'pie'
            },

            plotOptions: {
                pie: {
                    dataLabels: {
                        distance: -30,
                        color: 'white'
                    }
                }
            },

            series: [{
                data: [
                    [test[0],   44.2],
                    [test[1],       26.6],
                    [test[2],       20],
                    [test[3],    3.1],
                    [test[4],    5.4]
                ]
            }]
        });
    });
</code></pre>

<p>I want my data to be dynamic like </p>

<pre><code>             series: [{
                data: [
                  for (var i=0;i&lt;count;i++)
                 { 
                        [test[i],   44.2]
                 }
                     ]
            }]
</code></pre>

<p>Any idea?</p>
