Commit 4e9259c1 authored by 陈龙's avatar 陈龙

fix: 修复历史曲线多设备部显示x轴坐标的问题;调整历史曲线的宽度

parent a998f4be
......@@ -32,7 +32,7 @@
}
.swiper-wrapper {
width: calc(100% - 140px);
width: calc(100% - 20px);
}
.swiper-slide {
......@@ -70,7 +70,7 @@
}
.swiper-wrapper {
width: calc(100% - 140px);
width: calc(100% - 20px);
}
.swiper-slide {
......@@ -88,7 +88,6 @@
width: 100%;
min-width: 400px;
height: 42px;
//overflow-y: scroll;
.warningWrapper {
display: flex;
......@@ -138,9 +137,6 @@
.location {
display: inline-block;
//flex: 230;
//width: 230px;
//min-width: 100px;
flex: 1;
align-items: center;
margin-left: 14px;
......@@ -184,7 +180,6 @@
flex: 2;
margin-left: 14px;
overflow: hidden;
//width: 290px;
color: #ff2929;
white-space: nowrap;
text-overflow: ellipsis;
......
......@@ -45,7 +45,7 @@ const GridChart = memo((props) => {
}, [dataSource]);
const options = useMemo(() => {
return gridData.map((item) => {
let _options = gridData.map((item) => {
const { key, list, equipmentName, sensorName, stationCode, unit } = item;
const cusOption = {
title: {
......@@ -77,6 +77,8 @@ const GridChart = memo((props) => {
option: option,
};
});
console.log(_options);
return _options
}, [gridData, smooth, curveCenter]);
return (
......
......@@ -457,7 +457,15 @@ const returnXAxis = ({
return {
xAxis: {
type: 'time', min, max, axisLabel: {
formatter: contrast ? (contrastOption === 'month' ? '{dd}日' : '{HH}:{mm}') : ''
formatter: contrast ? (contrastOption === 'month' ? '{dd}日' : '{HH}:{mm}') : {
year: '{yyyy}',
month: '{MMM}',
day: '{d}日',
hour: '{HH}:{mm}',
minute: '{HH}:{mm}',
second: '{HH}:{mm}:{ss}',
none: '{yyyy}-{MM}-{dd} {hh}:{mm}:{ss}'
}
}
}, series
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment