{template "header.html"}

<script src="{THEME_PATH}assets/global/plugins/amcharts/amcharts/amcharts.js" type="text/javascript"></script>
<script src="{THEME_PATH}assets/global/plugins/amcharts/amcharts/serial.js" type="text/javascript"></script>

<script src="{THEME_PATH}assets/global/plugins/amcharts/amcharts/themes/light.js" type="text/javascript"></script>

<script type="text/javascript">
    $(function () {

        var chart = AmCharts.makeChart("chartdiv", {
            "theme": "light",
            "type": "serial",
            "dataProvider": {$data_tj},
            "valueAxes": [{
                "unit": "人",
                "position": "left",
                "title": "最近关注详情",
            }],
            "startDuration": 1,
            "graphs": [{
                "balloonText": "[[category]] 新关注粉丝数: <b>[[value]]</b>",
                "fillAlphas": 0.9,
                "lineAlpha": 0.2,
                "title": "新关注",
                "type": "column",
                "valueField": "year2004"
            }, {
                "balloonText": "[[category]] 累计关注粉丝数: <b>[[value]]</b>",
                "fillAlphas": 0.9,
                "lineAlpha": 0.2,
                "title": "累计关注",
                "type": "column",
                "clustered":false,
                "columnWidth":0.5,
                "valueField": "year2005"
            }],
            "plotAreaFillAlphas": 0.1,
            "categoryField": "country",
            "categoryAxis": {
                "gridPosition": "start"
            },
            "export": {
                "enabled": true
            }

        });

    });
</script>

<div class="row widget-row">

    <div class="col-md-3">
        <!-- BEGIN WIDGET THUMB -->
        <div class="widget-thumb widget-bg-color-white text-uppercase margin-bottom-20 bordered">
            <h4 class="widget-thumb-heading">今日新关注</h4>
            <div class="widget-thumb-wrap">
                <i class="widget-thumb-icon bg-green fa fa-plus"></i>
                <div class="widget-thumb-body" style="padding-top:10px">
                    <span class="widget-thumb-body-stat">{intval($fans[$today]['new'])}</span>
                </div>
            </div>
        </div>
        <!-- END WIDGET THUMB -->
    </div>
    <div class="col-md-3">
        <!-- BEGIN WIDGET THUMB -->
        <div class="widget-thumb widget-bg-color-white text-uppercase margin-bottom-20 bordered">
            <h4 class="widget-thumb-heading">今日取消关注 </h4>
            <div class="widget-thumb-wrap">
                <i class="widget-thumb-icon bg-red fa fa-minus"></i>
                <div class="widget-thumb-body" style="padding-top:10px">
                    <span class="widget-thumb-body-stat">{intval($fans[$today]['cancel'])}</span>
                </div>
            </div>
        </div>
        <!-- END WIDGET THUMB -->
    </div>
    <div class="col-md-3">
        <!-- BEGIN WIDGET THUMB -->
        <div class="widget-thumb widget-bg-color-white text-uppercase margin-bottom-20 bordered">
            <h4 class="widget-thumb-heading">累积关注 </h4>
            <div class="widget-thumb-wrap">
                <i class="widget-thumb-icon bg-blue icon-bar-chart"></i>
                <div class="widget-thumb-body" style="padding-top:10px">
                    <span class="widget-thumb-body-stat">{intval($usercount)}</span>
                </div>
            </div>
        </div>
        <!-- END WIDGET THUMB -->
    </div>
    <div class="col-md-3">
        <!-- BEGIN WIDGET THUMB -->
        <div class="widget-thumb widget-bg-color-white text-uppercase margin-bottom-20 bordered">
            <h4 class="widget-thumb-heading">今日消息数 </h4>
            <div class="widget-thumb-wrap">
                <i class="widget-thumb-icon bg-purple fa fa-envelope"></i>
                <div class="widget-thumb-body" style="padding-top:10px">
                    <span class="widget-thumb-body-stat">{intval($msgcount)}</span>
                </div>
            </div>
        </div>
        <!-- END WIDGET THUMB -->
    </div>


</div>

<div class="row">
    <div class="col-md-12 col-sm-12">
        <div class="portlet light bordered">
            <div class="portlet-title">
                <div class="caption">
                    <span class="caption-subject bold uppercase font-dark">关注详情</span>
                </div>
            </div>
            <div class="portlet-body">
                <div id="chartdiv" class="chart" style="height: 400px;"> </div>
            </div>
        </div>
    </div>

</div>

{template "footer.html"}