Procházet zdrojové kódy

waterAnalysisDataVisualization water.js 李欣儒 commit at 2021-01-21

李欣儒 před 4 roky
rodič
revize
076a0c3dde
1 změnil soubory, kde provedl 53 přidání a 0 odebrání
  1. 53 0
      waterAnalysisDataVisualization/externalJs/water.js

+ 53 - 0
waterAnalysisDataVisualization/externalJs/water.js

@@ -1256,3 +1256,56 @@ function getListData(queryParam = {}) {
                         //提示框组件
                         trigger: 'axis',
                         formatter: function(params) {
+                            // console.log(params)
+                            var res = '位置:' + params[0].axisValue + '<br />异常水压值 :' + abnormal_pressure[params[0].dataIndex];
+                            return res;
+                        },
+                        axisPointer: {
+                            type: 'shadow',
+                        },
+                        textStyle: {
+
+                            fontStyle: 'normal',
+                            fontFamily: '微软雅黑',
+                            fontSize: 12,
+                        },
+                    },
+                    grid: {
+                        left: '0',
+                        right: '0',
+                        bottom: '40',
+                        top: '0',
+                        containLabel: true,
+                    },
+                    legend: {
+                        // 如果series 对象有name 值,则 legend可以不用写data
+                        itemGap: 20,
+                        itemHeight: 2,
+                        itemWidth: 15,
+                        icon: 'rect',
+                        textStyle: {
+                            color: "#AAA"
+                        },
+                        top: "bottom",
+                    },
+
+                    xAxis: [{
+                        type: 'category',
+                        //	boundaryGap: true,//坐标轴两边留白
+                        data: xData,
+                        axisLabel: {
+                            interval: 0,
+                            // rotate: 340,
+                            // formatter: function(val) {
+                            //     return val.split("").join("\n");
+                            // }, //横轴信息文字竖直显示
+                            textStyle: {
+                                color: '#AAA',
+                                fontStyle: 'normal',
+                                fontFamily: '微软雅黑',
+                                fontSize: 12,
+                            },
+                        },
+
+                        axisTick: {
+                            //坐标轴刻度相关设置。