forked from ddrilling/asb_cloud_front
Отображаемый интервал графика исправлен
This commit is contained in:
parent
3a35574a8b
commit
d4a8c7b1f1
@ -101,14 +101,14 @@ export const Column = ({ lineGroup, data, flowChartData, interval, showBorder, s
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
preDataParams.yStart = new Date()
|
preDataParams.yStart = new Date(Math.max(new Date(dataLast.date), preDataParams.yStart ?? new Date(0)))
|
||||||
preDataParams.yStart.setSeconds(preDataParams.yStart.getSeconds() - interval)
|
preDataParams.yStart.setSeconds(preDataParams.yStart.getSeconds() - interval * 0.97)
|
||||||
preDataParams.yInterval = interval
|
preDataParams.yInterval = interval
|
||||||
preDataParams.displayLabels = yDisplay ?? false
|
preDataParams.displayLabels = yDisplay ?? false
|
||||||
return {...preDataParams}
|
return {...preDataParams}
|
||||||
})
|
})
|
||||||
|
|
||||||
}, [data, lineGroup, interval, yDisplay, flowChartData])
|
}, [data, lineGroup, interval, yDisplay, flowChartData, dataLast])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={style}>
|
<div style={style}>
|
||||||
|
@ -314,6 +314,7 @@ export default function TelemetryView({ idWell }) {
|
|||||||
data[idx].rotorTorque = 0;
|
data[idx].rotorTorque = 0;
|
||||||
data[idx].blockSpeed = Math.abs(data[idx].blockSpeed)
|
data[idx].blockSpeed = Math.abs(data[idx].blockSpeed)
|
||||||
})
|
})
|
||||||
|
data.sort((a, b) => a.date > b.date ? 1 : -1)
|
||||||
setDataSaub(data)
|
setDataSaub(data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user