ошибка расчёта начальной даты исправлена

This commit is contained in:
goodmice 2021-11-12 16:01:29 +05:00
parent 7a95007f44
commit 809dbb42fb

View File

@ -22,7 +22,7 @@ const GetLimitShape = (flowChartData, points, accessor) => {
export const MonitoringColumn = ({ lineGroup, data, flowChartData, interval, showBorder, style, headerHeight }) => {
const [lineGroupWithoutShapes, setLineGroupWithoutShapes] = useState([])
const dataLast = data?.[data.length - 1]
const yStart = new Date(+(dataLast?.date ? dataLast.date : new Date()) - interval)
const yStart = new Date(+(dataLast?.date ? new Date(dataLast.date) : new Date()) - interval * 1000)
const pv = lineGroup.filter(line => line.showLabels).map(line => ({
color: line.color,
label: line.label,