|
@@ -1769,3 +1769,140 @@ function getListData(queryParam = {}) {
|
|
},
|
|
},
|
|
textStyle: {
|
|
textStyle: {
|
|
fontStyle: 'normal',
|
|
fontStyle: 'normal',
|
|
|
|
+ fontFamily: '微软雅黑',
|
|
|
|
+ align: 'left' //图例左对齐
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ legend: {
|
|
|
|
+ // 如果series 对象有name 值,则 legend可以不用写data
|
|
|
|
+ itemGap: 20,
|
|
|
|
+ itemHeight: 2,
|
|
|
|
+ itemWidth: 15,
|
|
|
|
+ icon: 'rect',
|
|
|
|
+ textStyle: {
|
|
|
|
+ color: "#AAA"
|
|
|
|
+ },
|
|
|
|
+ top: "bottom",
|
|
|
|
+ },
|
|
|
|
+ grid: {
|
|
|
|
+ left: '0',
|
|
|
|
+ right: '0',
|
|
|
|
+ bottom: '40',
|
|
|
|
+ top: '0',
|
|
|
|
+ containLabel: true,
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ //添加横线滚动条
|
|
|
|
+ dataZoom: {
|
|
|
|
+ start: 0, //默认为0
|
|
|
|
+ end: 100 - 1500 / 1, //默认为100
|
|
|
|
+ type: 'slider',
|
|
|
|
+ show: xData.length > 10 ? 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: "#aaa", // 分割线颜色
|
|
|
|
+ opacity: '0.2'
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ boundaryGap: ['0', '10%'],
|
|
|
|
+ }],
|
|
|
|
+ series: [{
|
|
|
|
+ name: '波动前水压值',
|
|
|
|
+ type: 'bar',
|
|
|
|
+ data: before_fluctuation,
|
|
|
|
+ barMaxWidth: '11',
|
|
|
|
+ itemStyle: {
|
|
|
|
+ borderColor: "#0096FF",
|
|
|
|
+ },
|
|
|
|
+ barGap: '50%',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '波动后水压值',
|
|
|
|
+ type: 'bar',
|
|
|
|
+ data: after_fluctuation,
|
|
|
|
+ barMaxWidth: '11',
|
|
|
|
+ itemStyle: {
|
|
|
|
+ borderColor: "#FF9C00",
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ myChart.setOption(option);
|
|
|
|
+ var img1 = document.getElementById('dataChangeChart1_img');
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ img1.src = myChart.getDataURL();
|
|
|
|
+ }, 1000)
|
|
|
|
+ })();
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ 导出数据对接 start
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ } else {
|