<?php
$cs = Yii::app()->getClientScript();

$cs->registerScript("loadgraph", "    
    $(document).ready(function() {
    setTimeout(function() {
            var canvas1 =document.getElementById('lead_ownr_1');
        Chart.defaults.global.responsive = true;
        var ctx = canvas1.getContext('2d');
        var pieChart = new Chart(ctx).Pie(".$plot.");
          }, 300);  
});", CClientScript::POS_HEAD);



?>
<div class="clearfix"></div>
<br>
<div class="clearfix">
    <div class="col-lg-4" data-initial-class="col-lg-4" id="pieChartParent">
        <section class="panel">
<!--            <header class="panel-heading">
                  Lead- Lead Owner
            </header>-->
            <div class="panel-body text-center">
                <div class="clearfix canvas-holder" id="lead_container_1">
                    <canvas id="lead_ownr_1" width="400" height="400"></canvas>
                </div>
            </div>
        </section>
    </div>
    <div class="col-lg-8">
      
        <table class="table table-hover table-bordered personal-task" id="tbl_graph_lead_details">
            <thead>
                <tr>
                    <th>No</th>
                    <th>Category</th>
                    <th>Quantity</th>
                  </tr>
            </thead>
            <tbody>
                <?php foreach($graphdata4 as $i => $each ): ?>
                <tr>
                    <td><?= $i+1; ?></td>
                    <td><?= $each['brand']; ?></td>
                    <td><?= number_format($each['quantity'], 2, '.', ''); ?></td>
                </tr>
                <?php endforeach; ?>
            </tbody>
        </table>



