|
@@ -1516,3 +1516,136 @@ function getListData(queryParam = {}) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ yAxis: {
|
|
|
|
+ type: "value",
|
|
|
|
+ axisTick: {
|
|
|
|
+ show: false // 去除刻度线
|
|
|
|
+ },
|
|
|
|
+ axisLabel: {
|
|
|
|
+ show: false // 去除文本
|
|
|
|
+ },
|
|
|
|
+ axisLine: {
|
|
|
|
+ show: false // 去除轴线
|
|
|
|
+ },
|
|
|
|
+ splitLine: {
|
|
|
|
+ lineStyle: {
|
|
|
|
+ color: "#aaa", // 分割线颜色
|
|
|
|
+ opacity: .2
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ series: [{
|
|
|
|
+ symbol: "none",
|
|
|
|
+ name: "方差",
|
|
|
|
+ type: "line",
|
|
|
|
+ data: sortData[0].data[0]
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ symbol: "none",
|
|
|
|
+ name: "标准差",
|
|
|
|
+ type: "line",
|
|
|
|
+ data: sortData[0].data[1]
|
|
|
|
+ }, {
|
|
|
|
+ symbol: "none",
|
|
|
|
+ name: "平均值",
|
|
|
|
+ type: "line",
|
|
|
|
+ data: sortData[0].data[2]
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ myChart.setOption(option);
|
|
|
|
+ //echarts赋值到src
|
|
|
|
+ var img1 = document.getElementById('divergenceChart3_img');
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ img1.src = myChart.getDataURL();
|
|
|
|
+ }, 1000)
|
|
|
|
+ })();
|
|
|
|
+
|
|
|
|
+ // 数据离散率挖掘4
|
|
|
|
+ (function() {
|
|
|
|
+ // 漏电电流
|
|
|
|
+ let a4 = [];
|
|
|
|
+ let b4 = [];
|
|
|
|
+ let c4 = [];
|
|
|
|
+ let d4 = [];
|
|
|
|
+ let leakage_current = dispersion_rate.leakage_current;
|
|
|
|
+ leakage_current.forEach(function(item, index) {
|
|
|
|
+ a4.push(item.variance)
|
|
|
|
+ b4.push(item.standard_deviation)
|
|
|
|
+ c4.push(item.average_value)
|
|
|
|
+ d4.push(item.data_time)
|
|
|
|
+ });
|
|
|
|
+ var sortData = [{
|
|
|
|
+ sortName: "三相电流",
|
|
|
|
+ data: [
|
|
|
|
+ a4, b4, c4
|
|
|
|
+ ]
|
|
|
|
+ }, ];
|
|
|
|
+
|
|
|
|
+ var xData = function() {
|
|
|
|
+ var data = [];
|
|
|
|
+ for (var i = 1; i < leakage_current.length + 1; i++) {
|
|
|
|
+ data.push(i);
|
|
|
|
+ }
|
|
|
|
+ return data;
|
|
|
|
+ }();
|
|
|
|
+
|
|
|
|
+ // 1. 实例化对象
|
|
|
|
+ var myChart = echarts.init(document.querySelector("#divergenceChart4"));
|
|
|
|
+ // 2.指定配置
|
|
|
|
+ var option = {
|
|
|
|
+
|
|
|
|
+ color: [{
|
|
|
|
+
|
|
|
|
+ colorStops: [{
|
|
|
|
+ offset: 0,
|
|
|
|
+ color: '#F9860C' // 0% 处的颜色
|
|
|
|
+ }, {
|
|
|
|
+ offset: 1,
|
|
|
|
+ color: '#fff' // 100% 处的颜色
|
|
|
|
+ }],
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ colorStops: [{
|
|
|
|
+ offset: 0,
|
|
|
|
+ color: '#07E1F1' // 0% 处的颜色
|
|
|
|
+ }, {
|
|
|
|
+ offset: 1,
|
|
|
|
+ color: '#0456CB' // 100% 处的颜色
|
|
|
|
+ }],
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ colorStops: [{
|
|
|
|
+ offset: 0,
|
|
|
|
+ color: '#11F90C' // 0% 处的颜色
|
|
|
|
+ }, {
|
|
|
|
+ offset: 1,
|
|
|
|
+ color: '#3FC713' // 100% 处的颜色
|
|
|
|
+ }],
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ],
|
|
|
|
+
|
|
|
|
+ tooltip: {
|
|
|
|
+ trigger: "axis",
|
|
|
|
+ textStyle: {
|
|
|
|
+ align: 'left' //图例左对齐
|
|
|
|
+ },
|
|
|
|
+ backgroundColor: '#12DFE0',
|
|
|
|
+ formatter: '{a0}: {c0}<br />{a1}: {c1}<br />{a2}: {c2}<br />时间:{b}'
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ legend: {
|
|
|
|
+ // 如果series 对象有name 值,则 legend可以不用写data
|
|
|
|
+ itemGap: 20,
|
|
|
|
+ itemHeight: 2,
|
|
|
|
+ itemWidth: 15,
|