Browse Source

趋势图坐标轴自动适应

master
liujiangyong 1 year ago
parent
commit
713c376e5c
  1. 12
      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

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

@ -5,7 +5,7 @@ import ReactECharts from 'echarts-for-react';
import moment from 'moment'
export default function Right_2 ({ depthWater }) {
export default function Right_2({ depthWater }) {
return (
<div className='card-item' style={{ height: '55%' }}>
<CardTitle title='泵站水位' />
@ -55,6 +55,12 @@ export default function Right_2 ({ depthWater }) {
areaStyle: {
color: '#FFF',
},
min: (value) => {
return Math.floor(value.min * 10) / 10;
},
max: (value) => {
return Math.ceil(value.max * 10) / 10;
}
},
series: [
{
@ -64,7 +70,7 @@ export default function Right_2 ({ depthWater }) {
areaStyle: {
color: '#0e9cff26',
},
data: depthWater?.map(v => [moment(v.time).format('YYYY-MM-DD HH:mm:ss'),v.sLiquid_level?.toFixed(2)])
data: depthWater?.map(v => [moment(v.time).format('YYYY-MM-DD HH:mm:ss'), v.sLiquid_level?.toFixed(2)])
},
{
type: 'line',
@ -73,7 +79,7 @@ export default function Right_2 ({ depthWater }) {
areaStyle: {
color: '#0e9cff26',
},
data: depthWater?.map(v => [moment(v.time).format('YYYY-MM-DD HH:mm:ss'),v.sGrille_level?.toFixed(2) || 0])
data: depthWater?.map(v => [moment(v.time).format('YYYY-MM-DD HH:mm:ss'), v.sGrille_level?.toFixed(2) || 0])
},
]

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

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

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

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

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

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

Loading…
Cancel
Save