<link rel="stylesheet" href="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/css/bootstrap-datepicker.standalone.min.css">
<script src="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
<script src="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<div class="content_wrapper">

    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-12">

                <aside>
                    <header><i class="fa fa-fw fa-file"></i>零牌局新增玩家统计</header>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
                            </div>
                        </div>
                    </section>
                </aside>


                <aside>
                    <header><i class="fa fa-fw fa-file"></i>零牌局新增玩家</header>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="table-responsive">
                                        <table id="example" class="table table-striped table-bordered table-hover" cellspacing="0" width="100%">
                                            <thead>
                                            <tr>
                                                <th>日期</th>
                                                <th>当天新增玩家</th>
                                                <th>零局玩家总数</th>
                                                <th>占比</th>
                                            </tr>
                                            </thead>
                                            <tbody>

                                            <?php 
                                                if(is_array($list)){
                                                    foreach ($list as $key => $val) {
                                            ?>
                                            <tr>
                                                <td><?php echo $val['time'];?></td>
                                                <td><?php echo $val['totalnum'];?></td>
                                                <td><?php echo $val['noplaynum'];?></td>
                                                <td><?php echo round($val['noplaynum']/$val['totalnum'], 4)*100;?>%</td>
                                            </tr>
                                            <?php } } else{?>
                                            <tr>
                                                <td colspan="10">暂无数据</td>
                                            </tr>
                                            <?php } ?>
                                            </tbody>
                                        </table>
                                    </div>
                                    <nav>
                                        <ul class="pagination">
                                            <li class="disabled"><a href="#">共<span class="pagetotal"><?php echo $total;?></span>条</a></li>
                                            <?php echo $pageurl;?>
                                        </ul>
                                    </nav>
                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
    </div>

</div>
<script type="text/javascript" src="<?php echo base_url();?>public/js/highcharts/highcharts.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>public/js/highcharts/modules/exporting.js"></script>
<script>
    //选择日期
    $('.datetimepicker').datepicker({
        language:'zh-CN',
        format:'yyyy-mm-dd',
        zIndexOffset:906  //控制z-index
    });

    Highcharts.chart('container', {
        chart: {
            type: 'line'
        },
        title: {
            text: '零局玩家统计'
        },
        subtitle: {
            text: ''
        },
        xAxis: {
            categories: [<?php echo "'".implode("','", $dayList)."'";?>]
        },
        yAxis: {
            title: {
                text: '数值'
            }
        },
        plotOptions: {
            line: {
                dataLabels: {
                    enabled: true
                },
                enableMouseTracking: false
            }
        },
        series: [<?php echo $str;?>]
    });


</script>