forked from ddrilling/asb_cloud_front
Добавлена нормализация данных
This commit is contained in:
parent
909ed39faf
commit
95cfc93048
@ -7,6 +7,7 @@ import LoaderPortal from '../../components/LoaderPortal'
|
||||
import { Flex } from '../../components/Grid'
|
||||
import { PeriodPicker, defaultPeriod } from '../../components/PeriodPicker'
|
||||
import { ArchiveDisplay, cutData } from './ArchiveDisplay'
|
||||
import { normalizeData, sortByDate } from '../TelemetryView'
|
||||
|
||||
const DATA_COUNT = 2048 // Колличество точек на подгрузку графика
|
||||
const ADDITIVE_PAGES = 2 // Дополнительные данные для графиков
|
||||
@ -103,8 +104,8 @@ export default function Archive({idWell}) {
|
||||
if (data) {
|
||||
data.forEach(elm => elm.date = new Date(elm.date))
|
||||
setDataSaub((prevDataSaub) => {
|
||||
const newData = [...prevDataSaub, ...data]
|
||||
newData.sort((a, b) => a.date > b.date ? 1 : -1)
|
||||
const newData = [...prevDataSaub, ...normalizeData(data)]
|
||||
newData.sort(sortByDate)
|
||||
return cutData(newData, loadedStartDate, loadedEndDate)
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user