| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853 |
- $(function () {
- // var whdef = 100/1920;// 表示1920的设计图,使用100PX的默认值
- var whdef = 100/916;// 表示1920的设计图,使用100PX的默认值
- var wH = window.innerHeight;// 当前窗口的高度
- var wW = window.innerWidth;// 当前窗口的宽度
- // var rem = wW * whdef;// 以默认比例值乘以当前窗口宽度,得到该宽度下的相应FONT-SIZE值
- var rem = wH * whdef;// 以默认比例值乘以当前窗口宽度,得到该宽度下的相应FONT-SIZE值
- $('html').css('font-size', rem + "px");
- loadoOption_ec_dixiacheku();
- loadoOption_ec_fengjifang();
- loadoOption_ec_bengfangjishuijing();
- //loadoOption_ec_bengfangshuixiang();
- loadoOption_ec_wushuijing();
- }) ;
- function loadoOption_ec_wushuijing(){
- ec_wushuijing.clear();
- var option = {
- title: {
- //text: '污水井',
- show: true,
- textStyle: {
- fontWeight: 'normal',
- fontSize: 22,
- color: '#3db3cb'
- },
- left: '2%',
- top: '2%'
- },
- tooltip: {
- trigger: 'axis',
- extraCssText:'width:180px;',
- position: function (point, params, dom, rect, size) {
- // 鼠标坐标和提示框位置的参考坐标系是:以外层div的左上角那一点为原点,x轴向右,y轴向下
- // 提示框位置
- var x = 0; // x坐标位置
- var y = 0; // y坐标位置
-
- // 当前鼠标位置
- var pointX = point[0];
- var pointY = point[1];
-
- // 外层div大小
- // var viewWidth = size.viewSize[0];
- // var viewHeight = size.viewSize[1];
-
- // 提示框大小
- var boxWidth = size.contentSize[0];
- var boxHeight = size.contentSize[1];
-
- // boxWidth > pointX 说明鼠标左边放不下提示框
- if (boxWidth > pointX) {
- x = 5;
- } else { // 左边放的下
- x = pointX - boxWidth;
- }
-
- // boxHeight > pointY 说明鼠标上边放不下提示框
- if (boxHeight > pointY) {
- y = 5;
- } else { // 上边放得下
- y = pointY - boxHeight;
- }
-
- return [x, y];
- }
- },
-
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- boundaryGap: false,
- axisLine: {
- lineStyle: {
- color: 'rgba(128, 128, 128, 0.5)'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#999'
- }
- },
- data: ['12:00:00', '12:00:05', '12:00:10', '12:00:15', '12:00:20', '12:00:25']
- }],
- yAxis: [{
- type: 'value',
- name: '',
- axisTick: {
- show: false
- },
- axisLine: {
- show:false,
- lineStyle: {
- color: '#fff'
- }
- },
- min: function(value) {
- return Math.round(value.min - 10);
- },
- max: function(value) {
- return Math.round(value.min + 10);
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#799dff'
- }
- },
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: 'rgba(121, 157, 255, 0.5)'
- }
- }
- }],
- series: [{
- name: '污水井',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [12, 11, 14, 12, 16, 15]
- }]
- }
- ec_wushuijing.setOption(option);
- }
- function loadoOption_ec_bengfangjishuijing(){
- ec_bengfangjishuijing.clear();
- var option = {
- title: {
- // text: '泵房集水井',
- show: true,
- textStyle: {
- fontWeight: 'normal',
- fontSize: 22,
- color: '#3db3cb'
- },
- left: '2%',
- top: '2%'
- },
- tooltip: {
- trigger: 'axis',
- extraCssText:'width:180px;',
- position: function (point, params, dom, rect, size) {
- // 鼠标坐标和提示框位置的参考坐标系是:以外层div的左上角那一点为原点,x轴向右,y轴向下
- // 提示框位置
- var x = 0; // x坐标位置
- var y = 0; // y坐标位置
-
- // 当前鼠标位置
- var pointX = point[0];
- var pointY = point[1];
-
- // 外层div大小
- // var viewWidth = size.viewSize[0];
- // var viewHeight = size.viewSize[1];
-
- // 提示框大小
- var boxWidth = size.contentSize[0];
- var boxHeight = size.contentSize[1];
-
- // boxWidth > pointX 说明鼠标左边放不下提示框
- if (boxWidth > pointX) {
- x = 5;
- } else { // 左边放的下
- x = pointX - boxWidth;
- }
-
- // boxHeight > pointY 说明鼠标上边放不下提示框
- if (boxHeight > pointY) {
- y = 5;
- } else { // 上边放得下
- y = pointY - boxHeight;
- }
-
- return [x, y];
- }
- },
- legend: {
- data:['泵房集水井','泵房水箱'],
- textStyle: {
- fontSize: 14,
- color: '#799dff'
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- boundaryGap: false,
- axisLine: {
- lineStyle: {
- color: 'rgba(128, 128, 128, 0.5)'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#999'
- }
- },
- data: ['12:00:00', '12:00:05', '12:00:10', '12:00:15', '12:00:20', '12:00:25']
- }],
- yAxis: [{
- type: 'value',
- name: '',
- axisTick: {
- show: false
- },
- axisLine: {
- show:false,
- lineStyle: {
- color: '#fff'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#799dff'
- }
- },
- min: function(value) {
- return Math.round(value.min - 10);
- },
- max: function(value) {
- return Math.round(value.min + 10);
- },
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: 'rgba(121, 157, 255, 0.5)'
- }
- }
-
- }],
- series: [{
- name: '泵房集水井',
- type: 'bar',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [12, 11, 14, 12, 16, 15]
- },
- {
- name: '泵房水箱',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [12, 11, 14, 12, 16, 15]
- }]
- }
- ec_bengfangjishuijing.setOption(option);
- }
- function loadoOption_ec_bengfangshuixiang(){
- ec_bengfangshuixiang.clear();
- var option = {
- title: {
- // text: '泵房水箱',
- show: true,
- textStyle: {
- fontWeight: 'normal',
- fontSize: 22,
- color: '#3db3cb'
- },
- left: '2%',
- top: '2%'
- },
- tooltip: {
- trigger: 'axis',
- extraCssText:'width:180px;',
- position: function (point, params, dom, rect, size) {
- // 鼠标坐标和提示框位置的参考坐标系是:以外层div的左上角那一点为原点,x轴向右,y轴向下
- // 提示框位置
- var x = 0; // x坐标位置
- var y = 0; // y坐标位置
-
- // 当前鼠标位置
- var pointX = point[0];
- var pointY = point[1];
-
- // 外层div大小
- // var viewWidth = size.viewSize[0];
- // var viewHeight = size.viewSize[1];
-
- // 提示框大小
- var boxWidth = size.contentSize[0];
- var boxHeight = size.contentSize[1];
-
- // boxWidth > pointX 说明鼠标左边放不下提示框
- if (boxWidth > pointX) {
- x = 5;
- } else { // 左边放的下
- x = pointX - boxWidth;
- }
-
- // boxHeight > pointY 说明鼠标上边放不下提示框
- if (boxHeight > pointY) {
- y = 5;
- } else { // 上边放得下
- y = pointY - boxHeight;
- }
-
- return [x, y];
- }
- },
-
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- boundaryGap: false,
- axisLine: {
- lineStyle: {
- color: 'rgba(128, 128, 128, 0.5)'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#999'
- }
- },
- data: ['12:00:00', '12:00:05', '12:00:10', '12:00:15', '12:00:20', '12:00:25']
- }],
- yAxis: [{
- type: 'value',
- name: '',
- axisTick: {
- show: false
- },
- axisLine: {
- show:false,
- lineStyle: {
- color: '#fff'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#799dff'
- }
- },
- min: function(value) {
- return Math.round(value.min - 10);
- },
- max: function(value) {
- return Math.round(value.min + 10);
- },
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: 'rgba(121, 157, 255, 0.5)'
- }
- }
- }],
- series: [{
- name: '泵房水箱',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [220, 210, 245, 222, 265, 250]
- }]
- }
- ec_bengfangshuixiang.setOption(option);
- }
- function loadoOption_ec_fengjifang(){
- ec_fengjifang.clear();
- var option = {
- title: {
- //text: '风机房集水井',
- show: true,
- textStyle: {
- fontWeight: 'normal',
- fontSize: 22,
- color: '#3db3cb'
- },
- left: '2%',
- top: '2%'
- },
- tooltip: {
- trigger: 'axis',
- extraCssText:'width:180px;',
- position: function (point, params, dom, rect, size) {
- // 鼠标坐标和提示框位置的参考坐标系是:以外层div的左上角那一点为原点,x轴向右,y轴向下
- // 提示框位置
- var x = 0; // x坐标位置
- var y = 0; // y坐标位置
-
- // 当前鼠标位置
- var pointX = point[0];
- var pointY = point[1];
-
- // 外层div大小
- // var viewWidth = size.viewSize[0];
- // var viewHeight = size.viewSize[1];
-
- // 提示框大小
- var boxWidth = size.contentSize[0];
- var boxHeight = size.contentSize[1];
-
- // boxWidth > pointX 说明鼠标左边放不下提示框
- if (boxWidth > pointX) {
- x = 5;
- } else { // 左边放的下
- x = pointX - boxWidth;
- }
-
- // boxHeight > pointY 说明鼠标上边放不下提示框
- if (boxHeight > pointY) {
- y = 5;
- } else { // 上边放得下
- y = pointY - boxHeight;
- }
-
- return [x, y];
- }
- },
-
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- boundaryGap: false,
- axisLine: {
- lineStyle: {
- color: 'rgba(128, 128, 128, 0.5)'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#999'
- }
- },
- data: ['12:00:00', '12:00:05', '12:00:10', '12:00:15', '12:00:20', '12:00:25']
- }],
- yAxis: [{
- type: 'value',
- name: '',
- axisTick: {
- show: false
- },
- axisLine: {
- show:false,
- lineStyle: {
- color: '#fff'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#799dff'
- }
- },
- min: function(value) {
- return Math.round(value.min - 10);
- },
- max: function(value) {
- return Math.round(value.min + 10);
- },
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: 'rgba(121, 157, 255, 0.5)'
- }
- }
- }],
- series: [{
- name: '风机房集水井',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [12, 11, 14, 12, 16, 15]
- }]
- }
- ec_fengjifang.setOption(option);
- }
- function loadoOption_ec_dixiacheku(){
- ec_dixiacheku.clear();
- var option = {
- title: {
- // text: '集水井',
- show: true,
- textStyle: {
- fontWeight: 'normal',
- fontSize: 22,
- color: '#3db3cb'
- },
- left: '2%',
- top: '2%'
- },
- tooltip: {
- trigger: 'axis',
- extraCssText:'width:180px;',
- position: function (point, params, dom, rect, size) {
- // 鼠标坐标和提示框位置的参考坐标系是:以外层div的左上角那一点为原点,x轴向右,y轴向下
- // 提示框位置
- var x = 0; // x坐标位置
- var y = 0; // y坐标位置
-
- // 当前鼠标位置
- var pointX = point[0];
- var pointY = point[1];
-
- // 外层div大小
- // var viewWidth = size.viewSize[0];
- // var viewHeight = size.viewSize[1];
-
- // 提示框大小
- var boxWidth = size.contentSize[0];
- var boxHeight = size.contentSize[1];
-
- // boxWidth > pointX 说明鼠标左边放不下提示框
- if (boxWidth > pointX) {
- x = 5;
- } else { // 左边放的下
- x = pointX - boxWidth;
- }
-
- // boxHeight > pointY 说明鼠标上边放不下提示框
- if (boxHeight > pointY) {
- y = 5;
- } else { // 上边放得下
- y = pointY - boxHeight;
- }
-
- return [x, y];
- }
- },
- legend: {
- data:['地下车库西南','地下车库东南','地下车库东中','地下车库西中','地下车库西北'],
- textStyle: {
- fontSize: 14,
- color: '#799dff'
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- boundaryGap: false,
- axisLine: {
- lineStyle: {
- color: 'rgba(128, 128, 128, 0.5)'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#999'
- }
- },
- data: ['12:00:00', '12:00:05', '12:00:10', '12:00:15', '12:00:20', '12:00:25']
- }],
- yAxis: [{
- type: 'value',
- name: '',
- axisTick: {
- show: false
- },
- axisLine: {
- show:false,
- lineStyle: {
- color: '#fff'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#799dff'
- }
- },
- min: function(value) {
- return Math.round(value.min - 10);
- },
- max: function(value) {
- return Math.round(value.min + 10);
- },
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: 'rgba(121, 157, 255, 0.5)'
- }
- }
- }],
- series: [{
- name: '地下车库西南',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [12, 11, 14, 12, 16, 15]
- },{
- name: '地下车库东南',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [12, 11, 14, 12, 16, 15]
- },
- {
- name: '地下车库东中',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [12, 11, 14, 12, 16, 15]
- },
- {
- name: '地下车库西中',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [12, 11, 14, 12, 16, 15]
- },
- {
- name: '地下车库西北',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- }, markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
-
- data: [12, 11, 14, 12, 16, 15]
- },]
- }
- ec_dixiacheku.setOption(option);
- }
|