Commit 6a5da773 authored by 陈龙's avatar 陈龙

feat: 优化显示

parent 26fbdcef
......@@ -33,7 +33,7 @@ const Demo = () => {
<HistoryView deviceParams={deviceParams} defaultModel="curve"/>
</div>
<div style={{height: 300}}>
<MobileHistoryChart deviceParams={deviceParams} chartType={'lineChart'}/>
<MobileHistoryChart deviceParams={deviceParams} chartType={'boxChart'}/>
</div>
</div>
......
......@@ -40,14 +40,14 @@ const MobileHistoryChart = (
date = {
dateFrom: moment().format(`${DATE_FORMAT} 00:00:00`),
dateTo: moment().format(`${DATE_FORMAT} 23:59:59`)
},
deviceParams = [],
ignoreOutliers = true,
isDilute = true,
needMarkLine = true,
showBoxOption = true, //
chartGrid = true,
},// 默认当天
deviceParams = [], // 设备参数,必传
chartType='lineChart', // lineChart boxChart
ignoreOutliers = true, // 滤波
isDilute = true, // 抽稀去重
needMarkLine = true,
showBoxOption = true, // 开启箱线图配置,默认开启
chartGrid = true, // 开启网格
}
) => {
const [deviceAlarmSchemes, setDeviceAlarmSchemes] = useState(null);
......@@ -57,7 +57,7 @@ const MobileHistoryChart = (
const isBoxPlots =
deviceParams?.length === 1 && deviceParams[0]?.sensors?.split(',').length === 1;
const handleDataThinKey = (diffDays) => {
// 移动端缩放的抽稀一倍
// 移动端缩放的抽稀一倍,需要实际调试
if (diffDays >= 7 && diffDays < 15) {
return {unit: 'h', zoom: '4'};
} else if (diffDays >= 15 && diffDays < 30) {
......@@ -69,7 +69,7 @@ const MobileHistoryChart = (
} else if (diffDays < 2 && diffDays >= 1) {
return {unit: 'min', zoom: '60'};
} else {
return {unit: 'min', zoom: '20'};
return {unit: 'min', zoom: '60'};
}
};
......
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