<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>执行统计报告</title>
    <!-- 引入 echarts.js -->
    <script type="text/javascript" src="{{ url_for('static', filename='lib/echarts.min.js') }}"></script>
    <style>
    html {
        scroll-behavior: smooth;
         }
    </style>
</head>
<body>
            <div>
            {% for m in monitor %}
                <div id="submodule{{ m.no }}" style="width:700px;height:290px;margin: 0 auto; padding:10px"></div>
                <script type="text/javascript">
                    var submoduleChart = echarts.init(document.getElementById('submodule{{ m.no }}'));
                    // 指定图表的配置项和数据
                        var    submodule{{ m.no }} = {
                            title : {
                                text: '{{ m.name }}',
                                x:'center'
                            },
                            tooltip : {
                                trigger: 'axis',
                                axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                                    type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                                }
                            },
                            toolbox: {
                                show : true,
                                feature : {
                                    mark : {show: true},
                                    dataView : {show: true, readOnly: false},
                                    magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
                                    restore : {show: true},
                                    saveAsImage : {show: true}
                                }
                            },
                            calculable : true,
                            xAxis : {
                                    data : {{ m.time|safe }}
                                },
                            yAxis : {},
                            series: [
                                {
                                    type : 'line',
                                    smooth: true,
                                    data : {{ m.data|safe }}
                                }
                            ]
                        };

                    submoduleChart.setOption(submodule{{ m.no }});
                </script>

            {% endfor %}
             </div>

</body>
</html>