<!DOCTYPE html>
<html style="height: 100%;width: 100%;">

<head>
    <script src="ue.js"></script>
    <meta charset="utf-8">
</head>

<body style="height: 100%;width: 100%; margin: 0;font-size:1rem;line-height:150%;overflow-y: hidden;overflow-x:hidden;">
    <div id="container" style="height: 100%;width: 100%;"></div>
    <script type="text/javascript" src="jquery-1.11.0.min.js"></script>
    <script type="text/javascript" src="echarts.min.js"></script>
    <script type="text/javascript" src="ajax.js"></script>
    <script type="text/javascript">


        var dom = document.getElementById("container");
        var myChart = echarts.init(dom);
        var app = {};
        var option;

        function eacharsassignment(s) {
            console.log(s);



            var name = s.name;
            var dataX = s.dataX;
            var dataY1 = s.dataY1;
           
            option = {
   // backgroundColor: '#021B6C',
   
    dataZoom: [
        {
            type: 'inside',
            // filterMode: 'filter',
            realtime: true,
            // "start": 10,
            // "end": 90
        },
        {
            show: true,
            xAxisIndex: [0],
            realtime: true,
            height: 4,//这里可以设置dataZoom的尺寸
            bottom: '1%',
            backgroundColor: '#1d76e6', // 填充颜色
            textStyle: {
             color: '#fff' // 左右两边文字颜色
           },
        }
    ],
    tooltip: {
        trigger: 'axis',
        // formatter: '{b}:{c}个',
        backgroundColor: 'rgba(0, 0, 0, 0.63)', //设置背景颜色
        textStyle: {
            color: '#fff'
        },
        borderColor: "rgba(255,255,255, .5)",
        // formatter: function(params) {
        //     return params[0].name + '<br/>' +
        //         "<span style='display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:rgba(1, 251, 246, 1)'></span>" +
        //         params[0].seriesName + ' : ' + Number((params[0].value.toFixed(4) / 1).toFixed(2)).toLocaleString() + ' 个<br/>'
            
        // }
        axisPointer: {
            lineStyle: {
                color: {
                    type: 'linear',
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [{
                        offset: 0,
                        color: 'rgba(0, 255, 233,0)'
                    }, {
                        offset: 0.5,
                        color: 'rgba(255, 255, 255,1)',
                    }, {
                        offset: 1,
                        color: 'rgba(0, 255, 233,0)'
                    }],
                    global: false
                }
            },
        },
    },
    grid: {
        top: '15%',
        left: '4%',
        right: '5%',
        bottom: '6%',
        containLabel: true
    },
    xAxis: [{
        type: 'category',
        boundaryGap: false,
        axisLine: {
            show: true,
            lineStyle: {
                color: '#26367A'
            }
        },
        splitArea: {
            // show: true,
            color: '#f00',
            lineStyle: {
                color: '#f00'
            },
        },
        axisLabel: {
            textStyle:{
                color: 'rgba(198, 207, 255, 1)',
                fontSize: 12
            },
            // color: '#fff',
            // rotate: 0,
            // margin: 10,
            interval: 0,
        },
        axisTick: {
            show: false
        },
        splitLine: {
            show: false
        },
        data: name,
        boundaryGap: ['10%', '10%']

    }],

    yAxis: [{
        type: 'value',
       // name: '项目数(个)',
        nameTextStyle: {
            color: '#fff',
            fontSize: '11px',
        },
        splitNumber: 4,
        splitLine: {
            show: true,
            interval: '0',
            lineStyle: {
                color: ['rgba(38, 54, 122, .58)'],
                type: 'dashed',
                width: 1
            }
        },
        axisLine: {
            show: false,
        },
        axisLabel: {
            show: true,
            // margin: 10,
            textStyle: {
              fontSize: 12,
              color: 'rgba(198, 207, 255, 1)'
            }
        },
        axisTick: {
            show: false,
        },
    }],
    series: [{
            name: '项目数量',
            type: 'line',
            smooth: true, //是否平滑
            showAllSymbol: true,
            // symbol: 'image://./static/images/guang-circle.png',
            symbol: 'circle',
            symbolSize: 6,
            lineStyle: {
                normal: {
                    color: "rgba(23, 174, 230, 1)",
                    shadowColor: 'rgba(0, 0, 0, 0)',
                    shadowBlur: 0,
                    shadowOffsetY:5,
                    shadowOffsetX: 5,
                },
            },
            label: {
                show: false,
                position: 'top',
                textStyle: {
                    color: 'rgba(1, 251, 246, 1)',
                    fontSize: 16
                }
            },
            itemStyle: {
                color: "#fff",
                borderColor: "rgba(255, 255, 255, .2)",
                borderWidth: 10,
                shadowColor: 'rgba(0, 0, 0, 0)',
                shadowBlur: 0,
                shadowOffsetY: 1,
                shadowOffsetX: 1,
            },
            tooltip: {
                show: true
            },
            // areaStyle: {
            //   color: {
            //     type: 'linear',
            //     x: 0,
            //     y: 0,
            //     x2: 0,
            //     y2: 1,
            //     colorStops: [
            //       {
            //         offset: 0,
            //         color: 'rgba(7, 251, 246, 0.56)'
            //       },
            //       {
            //         offset: 1,
            //         color: 'rgba(7, 251, 246, 0)'
            //       }
            //     ],
            //     global: false // 缺省为 false
            //   }
            // },
            data: dataY1
        }
    ]
};

            if (option && typeof option === 'object') {

            }
            myChart.setOption(option);
        };




        ue.interface.setEchatsValue = function (s) {
            eacharsassignment(s);
            console.log(s);
        }
    </script>
</body>

</html>