index.html 5.5 KB
<include file="public@header"/>
<meta charset="utf-8">
<!--<link rel="icon" href="https://static.jianshukeji.com/highcharts/images/favicon.ico">-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
    /* css 代码  */
</style>
<script src="https://img.hcharts.cn/highcharts/highcharts.js"></script>
<script src="https://img.hcharts.cn/highcharts/modules/exporting.js"></script>
<script src="https://img.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
</head>
<body>
<div class="wrap js-check-wrap">
    <form class="well form-inline margin-top-20" method="post" action="{:url('New/index')}">
        <!--分类:-->
        <!--<select class="form-control" name="category" style="width: 140px;">-->
            <!--<option value='0'>全部</option>-->
            <!--{$category_tree|default=''}-->
        <!--</select> &nbsp;&nbsp;-->
        时间:
        <input type="text" class="form-control js-bootstrap-datetime" name="start_time"
               value="{$start_time|default=''}"
               style="width: 140px;" autocomplete="off">-
        <input type="text" class="form-control js-bootstrap-datetime" name="end_time"
               value="{$end_time|default=''}"
               style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
        关键字:
        <input type="text" class="form-control" name="keyword" style="width: 200px;"
               value="{$keyword|default=''}" placeholder="请输入用户名">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('New/index')}">清空</a>
    </form>

</div>
<div id="container" style="min-width:400px;height:400px"></div>
<div id="container1" style="min-width:400px;height:400px"></div>
<script src="__STATIC__/js/admin.js"></script>
<script>
    var chart = Highcharts.chart('container', {
        title: {
            text: '混合图表'
        },
        xAxis: {
            categories: ['苹果', ' 橙', '梨', '香蕉', '李子']
        },
        plotOptions: {
            series: {
                stacking: 'normal'
            }
        },
        labels: {
            items: [{
                html: '水果消耗',
                style: {
                    left: '100px',
                    top: '18px',
                    color: (Highcharts.theme && Highcharts.theme.textColor) || 'black'
                }
            }]
        },
        series: [{
            type: 'column',
            name: '小张',
            data: [3, 2, 1, 3, 4]
        }, {
            type: 'column',
            name: '小潘',
            data: [2, 3, 5, 7, 6]
        }, {
            type: 'column',
            name: '小王',
            data: [4, 3, 3, 9, 0]
        }, {
            type: 'spline',
            name: '平均值',
            data: [3, 2.67, 3, 6.33, 3.33],
            marker: {
                lineWidth: 2,
                lineColor: Highcharts.getOptions().colors[3],
                fillColor: 'white'
            }
        }, {
            type: 'pie',
            name: '总的消耗',
            data: [{
                name: '小张',
                y: 13,
                color: Highcharts.getOptions().colors[0] // Jane's color
            }, {
                name: '小潘',
                y: 23,
                color: Highcharts.getOptions().colors[1] // John's color
            }, {
                name: '小王',
                y: 19,
                color: Highcharts.getOptions().colors[2] // Joe's color
            }],
            center: [100, 80],
            size: 100,
            showInLegend: false,
            dataLabels: {
                enabled: false
            }
        }]
    });
    var chart = Highcharts.chart('container1', {
        title: {
            text: '混合图表'
        },
        xAxis: {
            categories: ['苹果', ' 橙', '梨', '香蕉', '李子']
        },
        plotOptions: {
            series: {
                stacking: 'normal'
            }
        },
        labels: {
            items: [{
                html: '水果消耗',
                style: {
                    left: '100px',
                    top: '18px',
                    color: (Highcharts.theme && Highcharts.theme.textColor) || 'black'
                }
            }]
        },
        series: [{
            type: 'column',
            name: '小张',
            data: [3, 2, 1, 3, 4]
        }, {
            type: 'column',
            name: '小潘',
            data: [2, 3, 5, 7, 6]
        }, {
            type: 'column',
            name: '小王',
            data: [4, 3, 3, 9, 0]
        }, {
            type: 'spline',
            name: '平均值',
            data: [3, 2.67, 3, 6.33, 3.33],
            marker: {
                lineWidth: 2,
                lineColor: Highcharts.getOptions().colors[3],
                fillColor: 'white'
            }
        }, {
            type: 'pie',
            name: '总的消耗',
            data: [{
                name: '小张',
                y: 13,
                color: Highcharts.getOptions().colors[0] // Jane's color
            }, {
                name: '小潘',
                y: 23,
                color: Highcharts.getOptions().colors[1] // John's color
            }, {
                name: '小王',
                y: 19,
                color: Highcharts.getOptions().colors[2] // Joe's color
            }],
            center: [100, 80],
            size: 100,
            showInLegend: false,
            dataLabels: {
                enabled: false
            }
        }]
    });
</script>
</body>
</html>