
<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>
            </div>
        </div>
        <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="container2" style="min-width: 310px; height: 400px; margin: 0 auto"></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 type="text/javascript">

Highcharts.chart('container', {

    title: {
        text: '实时支付（北京时区）'
    },

    subtitle: {
        text: ''
    },
    xAxis: {
        categories: [<?php 
        	foreach($dayList as $k => $time){
        	    $date = substr($time,11,5);
        		echo "'".date("H:i",strtotime(date("Ymd")." ".$date)+3600*8)."',";
        	}
        ?>]
    },
    yAxis: {
        title: {
            text: '金额'
        }
    },
    series: [{
        color: '#00ff00',
        name: '支付金额',
        data: [<?php 
        	foreach($dayList as $k => $time){
        		if(strtotime($time) < time()){
        			echo (isset($list[$time])?$list[$time]:0).",";
        		}
        	}
        ?>]
    },
    {
        color: '#3333ff',
        name: '昨日支付金额',
        data: [<?php 
        	foreach($dayList as $k => $time){
        		$time = substr($time,11,5);
        		echo (isset($listYesterday[$time])?$listYesterday[$time]:0).",";
        	}
        ?>]
    },
    ],

    responsive: {
        rules: [{
            condition: {
                maxWidth: 500
            },
            chartOptions: {
                legend: {
                    layout: 'horizontal',
                    align: 'center',
                    verticalAlign: 'bottom'
                }
            }
        }]
    }
});

Highcharts.chart('container2', {

    title: {
        text: '实时支付（服务器时区）'
    },

    subtitle: {
        text: ''
    },
    xAxis: {
        categories: [<?php
        	foreach($dayList as $k => $time){
        	    $date = substr($time,11,5);
        		echo "'".date("H:i",strtotime(date("Ymd")." ".$date))."',";
        	}
        ?>]
    },
    yAxis: {
        title: {
            text: '金额'
        }
    },
    series: [{
        color: '#00ff00',
        name: '支付金额',
        data: [<?php
        	foreach($dayList as $k => $time){
        		if(strtotime($time) < time()){
        			echo (isset($list[$time])?$list[$time]:0).",";
        		}
        	}
        ?>]
    },
    {
        color: '#3333ff',
        name: '昨日支付金额',
        data: [<?php
        	foreach($dayList as $k => $time){
        		$time = substr($time,11,5);
        		echo (isset($listYesterday[$time])?$listYesterday[$time]:0).",";
        	}
        ?>]
    },
    ],

    responsive: {
        rules: [{
            condition: {
                maxWidth: 500
            },
            chartOptions: {
                legend: {
                    layout: 'horizontal',
                    align: 'center',
                    verticalAlign: 'bottom'
                }
            }
        }]
    }

});


</script>