Browse Source

趋势图坐标轴自动适应

master
liujiangyong 2 years ago
parent
commit
713c376e5c
  1. 6
      web/client/src/sections/bigScreen/components/basis/right_2.js
  2. 12
      web/client/src/sections/bigScreen/components/capacity.js
  3. 6
      web/client/src/sections/bigScreen/components/electrity/levelTrend.js
  4. 6
      web/client/src/sections/bigScreen/components/realTime/below.js

6
web/client/src/sections/bigScreen/components/basis/right_2.js

@ -55,6 +55,12 @@ export default function Right_2 ({ depthWater }) {
areaStyle: { areaStyle: {
color: '#FFF', color: '#FFF',
}, },
min: (value) => {
return Math.floor(value.min * 10) / 10;
},
max: (value) => {
return Math.ceil(value.max * 10) / 10;
}
}, },
series: [ series: [
{ {

12
web/client/src/sections/bigScreen/components/capacity.js

@ -807,6 +807,12 @@ const Capacity = ({ actions, dispatch, siteList, }) => {
areaStyle: { areaStyle: {
color: '#FFF', color: '#FFF',
}, },
min: (value) => {
return Math.floor(value.min * 10) / 10;
},
max: (value) => {
return Math.ceil(value.max * 10) / 10;
}
}, },
series: [ series: [
{ {
@ -902,6 +908,12 @@ const Capacity = ({ actions, dispatch, siteList, }) => {
areaStyle: { areaStyle: {
color: '#FFF', color: '#FFF',
}, },
min: (value) => {
return Math.floor(value.min);
},
max: (value) => {
return Math.ceil(value.max);
}
}, },
series: electricityTrend?.map(v => ({ series: electricityTrend?.map(v => ({
type: 'line', type: 'line',

6
web/client/src/sections/bigScreen/components/electrity/levelTrend.js

@ -64,6 +64,12 @@ const LevelTrend = ({ user, voltagePumpId, pumpList, setVoltagePumpId, depthWate
areaStyle: { areaStyle: {
color: '#FFF', color: '#FFF',
}, },
min: (value) => {
return Math.floor(value.min * 10) / 10;
},
max: (value) => {
return Math.ceil(value.max * 10) / 10;
}
}, },
series: [ series: [
{ {

6
web/client/src/sections/bigScreen/components/realTime/below.js

@ -252,6 +252,12 @@ const Below = ({ dispatch, actions, stations, level }) => {
areaStyle: { areaStyle: {
color: '#FFF', color: '#FFF',
}, },
min: (value) => {
return Math.floor(value.min);
},
max: (value) => {
return Math.ceil(value.max);
}
}, },
series: [ series: [
{ {

Loading…
Cancel
Save