paginate data in highcharts
<p>I am working on javascript high charts..</p>

<p>now i want to paginate bars to avoid crowded display...</p>

<p>please anyone help me to paginate the data of  bars ..</p>

<p>i am working on cakephp 1.3..</p>

<p>below is my script to display data in highcharts bars..</p>

<pre><code>&lt;script type="text/javascript"&gt;
    $(function() {
    $('#container').highcharts({
    chart: {
    type: 'column'
    },
            title: {
            text: ''
            },
            subtitle: {
            text: ''
            },
            xAxis: {
            categories: [
           &lt;?php  if($this-&gt;Session-&gt;read("SAVING_TYPE")=='Transport'){  ?&gt;
            &lt;?php foreach($content as $result) { ?&gt;
            '&lt;?php echo $result['origin_city']['origin_pcode']; ?&gt; - &lt;?php echo $result['dest_city']['dest_pcode']; ?&gt;',
           &lt;?php } ?&gt; 
           &lt;?php } elseif ($this-&gt;Session-&gt;read("SAVING_TYPE")=='CO2') { ?&gt;
             &lt;?php foreach($co2cont as $co2result) { ?&gt;
      '&lt;?php echo $co2result['origin_city']['origin_pcode']; ?&gt; - &lt;?php echo $co2result['dest_city']['dest_pcode']; ?&gt;',
           &lt;?php } } elseif ($this-&gt;Session-&gt;read("SAVING_TYPE")=='Traveltime') { ?&gt;
             &lt;?php foreach($travel as $travelresult) { ?&gt;
'&lt;?php echo $travelresult['origin_city']['origin_pcode']; ?&gt; - &lt;?php echo $travelresult['dest_city']['dest_pcode']; ?&gt;',
           &lt;?php } } ?&gt;           

                  ],
                                crosshair: true

                        },
                        yAxis: {
                        min: 0,
                                title: {
                                text: null
                                }
                        },
                        tooltip: {
                        headerFormat: '&lt;span style="font-size:10px"&gt;{point.key}&lt;/span&gt;&lt;table&gt;',
                                pointFormat: '&lt;tr&gt;&lt;td style="color:{series.color};padding:0"&gt;{series.name}: &lt;/td&gt;' +
                                '&lt;td style="padding:0"&gt;&lt;b&gt;{point.y} mm&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;',
                                footerFormat: '&lt;/table&gt;',
                                shared: true,
                                useHTML: true
                        },
                        legend: {
                        layout: 'vertical',
                                align: 'center',
                                verticalAlign: 'top',
                                floating: true,
                                borderWidth: 1,
                                width: 100,
                                height: 100
                        },
                        plotOptions: {
                        series: {
                        borderWidth: 0,
                                dataLabels: {
                                enabled: true,
                                        format: '{point.y}'
                                }
                        }
                        },
                        labels:
                {
                enabled: false
                },
                        series: [{
                        name: '&lt;?php  if($this-&gt;Session-&gt;read("SAVING_TYPE")=='Transport'){  ?&gt;
    &lt;?php echo $result['u_data']['Mode']; } elseif ($this-&gt;Session-&gt;read("SAVING_TYPE")=='CO2') { ?&gt;
    &lt;?php echo $co2result['u_data']['Mode']; } elseif ($this-&gt;Session-&gt;read("SAVING_TYPE")=='Traveltime') { ?&gt;
    &lt;?php echo $travelresult['u_data']['Mode']; } ?&gt; Cost',
                                data: [
             &lt;?php  if($this-&gt;Session-&gt;read("SAVING_TYPE")=='Transport'){  ?&gt;
            &lt;?php foreach($content as $result) { ?&gt;
            &lt;?php echo $result['u_data']['TotalCost']; ?&gt;, &lt;?php } ?&gt; 

           &lt;?php } elseif ($this-&gt;Session-&gt;read("SAVING_TYPE")=='CO2') { ?&gt;
            &lt;?php foreach($co2cont as $co2result) { ?&gt;
           &lt;?php echo $co2result['u_data']['totalco2_emmission']; ?&gt;,
            &lt;?php } } elseif ($this-&gt;Session-&gt;read("SAVING_TYPE")=='Traveltime') { ?&gt;
            &lt;?php foreach($travel as $travelresult) { ?&gt;
           &lt;?php echo $travelresult['u_data']['Days']; ?&gt;,
            &lt;?php } } ?&gt;

               ]

                        }, {
                        name: 'Road cost',                        

                                data: [&lt;?php  if($this-&gt;Session-&gt;read("SAVING_TYPE")=='Transport'){  ?&gt;
            &lt;?php foreach($modecost as $charge) { ?&gt;
            &lt;?php echo $charge['u_data']['totalcharge']; ?&gt;, &lt;?php } ?&gt;         
           &lt;?php } elseif ($this-&gt;Session-&gt;read("SAVING_TYPE")=='CO2') { ?&gt;
             &lt;?php foreach($co2modecost as $co2mode) { ?&gt;
             &lt;?php echo $co2mode['u_data']['CO2totalcharge']; ?&gt;,
            &lt;?php } } elseif ($this-&gt;Session-&gt;read("SAVING_TYPE")=='Traveltime') { ?&gt;
             &lt;?php foreach($travelmodecost as $travelmoderesult) { ?&gt;
             &lt;?php echo $travelmoderesult['u_data']['traveldays']; ?&gt;,
            &lt;?php } } ?&gt;
            ]
                   }]
                });
                });
&lt;/script&gt;




 &lt;div id="container" style="min-width:310px; height: 210px; margin: 0 auto"&gt;&lt;/div&gt; 
</code></pre>