pointCount вынесен в props

This commit is contained in:
goodmice 2021-11-12 18:08:40 +05:00
parent a9c148d891
commit e553c4c67f

View File

@ -19,7 +19,7 @@ const GetLimitShape = (flowChartData, points, accessor) => {
return min.concat(max.reverse()) ?? []
}
export const MonitoringColumn = ({ lineGroup, data, flowChartData, interval, showBorder, style, headerHeight }) => {
export const MonitoringColumn = ({ lineGroup, data, flowChartData, interval, showBorder, style, headerHeight, pointCount }) => {
const [lineGroupWithoutShapes, setLineGroupWithoutShapes] = useState([])
const dataLast = data?.[data.length - 1]
const yStart = new Date(+(dataLast?.date ? new Date(dataLast.date) : new Date()) - interval * 1000 * 0.97)
@ -68,6 +68,7 @@ export const MonitoringColumn = ({ lineGroup, data, flowChartData, interval, sho
yDisplay={false}
yStart={yStart}
savePreviousData={true}
pointCount={pointCount}
/>
</div>
<ChartTimeOnlineFooter data={dataLast} lineGroup={lineGroup} />