Prechádzať zdrojové kódy

waterAnalysisSharingEnginePush water.js 李欣儒 commit at 2020-12-29

李欣儒 4 rokov pred
rodič
commit
eeb0ade148

+ 102 - 0
waterAnalysisSharingEnginePush/externalJs/water.js

@@ -462,3 +462,105 @@ function getListData(queryParam = {}) {
                     tooltip: {
                         backgroundColor: '#12DFE0',
                         //提示框组件
+                        trigger: 'axis',
+                        formatter: function(params) {
+                            // console.log(params)
+                            var res = '位置:' + params[0].axisValue + '<br />异常水压值 :' + abnormal_pressure[params[0].dataIndex] + 'Mpa';
+                            return res;
+                        },
+                        axisPointer: {
+                            type: 'shadow',
+                        },
+                        textStyle: {
+                            fontStyle: 'normal',
+                            fontFamily: '微软雅黑',
+                        },
+                    },
+                    grid: {
+                        left: '0',
+                        right: '0',
+                        bottom: '40',
+                        top: '0',
+                        containLabel: true,
+                    },
+
+                    //添加横线滚动条
+                    dataZoom: {
+                        start: 0, //默认为0
+                        end: 100 - 1500 / 12, //默认为100
+                        type: 'slider',
+                        show: xData.length > 4 ? true : false,
+                        xAxisIndex: [0],
+                        handleSize: 0, //滑动条的 左右2个滑动条的大小
+                        height: 4, //组件高度
+                        left: 20, //左边的距离
+                        right: 20, //右边的距离
+                        bottom: 20, //右边的距离
+                        handleColor: '#CBBCDB', //h滑动图标的颜色
+                        handleStyle: {
+                            borderColor: "#CBBCDB",
+                            borderWidth: "1",
+                            shadowBlur: 2,
+                            background: "#CBBCDB",
+                            shadowColor: "#CBBCDB",
+                        },
+                        textStyle: {
+                            color: "#fff"
+                        },
+
+                        backgroundColor: 'rgba(37, 46, 100, 0.45)', //两边未选中的滑动条区域的颜色
+                        showDataShadow: false, //是否显示数据阴影 默认auto
+                        // showDetail: false, //即拖拽时候是否显示详细数值信息 默认true
+                        filterMode: 'filter',
+                    },
+
+
+                    xAxis: [{
+                        type: 'category',
+                        //	boundaryGap: true,//坐标轴两边留白
+                        data: xData,
+                        axisLabel: {
+                            interval: 0,
+                            // rotate: 340,
+                            // formatter: function(val) {
+                            //     return val.split("").join("\n");
+                            // }, //横轴信息文字竖直显示
+                            textStyle: {
+                                color: '#AADDFF',
+                                fontStyle: 'normal',
+                                fontFamily: '微软雅黑',
+                                fontSize: 12,
+                            },
+                        },
+
+                        axisTick: {
+                            //坐标轴刻度相关设置。
+                            show: false,
+                        },
+                        axisLine: {
+                            //坐标轴轴线相关设置
+                        },
+                        splitLine: {
+                            //坐标轴在 grid 区域中的分隔线。
+                            show: false,
+                        },
+                    }, ],
+                    yAxis: [{
+                        type: 'value',
+
+                        axisLabel: false,
+                        axisLine: {
+                            show: false,
+                        },
+                        axisTick: {
+                            show: false,
+                        },
+                        splitLine: {
+                            show: true,
+                            lineStyle: {
+                                color: ['#204C6F'],
+                                opacity: 0.3,
+                            },
+                        },
+                        boundaryGap: ['0', '10%'],
+                    }],