diff --git a/src/pages/Telemetry/OperationTime/index.jsx b/src/pages/Telemetry/OperationTime/index.jsx index 9e55b25..3b78fae 100644 --- a/src/pages/Telemetry/OperationTime/index.jsx +++ b/src/pages/Telemetry/OperationTime/index.jsx @@ -1,4 +1,4 @@ -import { memo, useCallback, useEffect, useMemo, useState } from 'react' +import { memo, useEffect, useMemo, useState } from 'react' import { Select } from 'antd' import moment from 'moment' @@ -21,8 +21,6 @@ const subsystemColors = [ '#ecf0f1', '#bdc3c7', '#95a5a6', '#7f8c8d', ] -const tableStyle = { background: '#FAFAFA', fontSize: '16px', fontWeight: '600', transition: 'all 0.2s ease-out' } - const tableColumns = [ makeColumn('Цвет', 'color', { width: 60, render: (backgroundColor) => (
@@ -47,7 +45,6 @@ export const OperationTime = memo(() => { const [showLoader, setShowLoader] = useState(false) const [data, setData] = useState([]) const [selected, setSelected] = useState([]) - const [selectedSubsystem, setSelectedSubsystem] = useState(null) const [dateRange, setDateRange] = useState([]) const [well] = useWell() @@ -62,29 +59,6 @@ export const OperationTime = memo(() => { color: d.color, })), [selectedData]) - const onRow = useCallback((item) => { - const out = { - onMouseEnter: () => setSelectedSubsystem(item.subsystemName), - onMouseLeave: () => setSelectedSubsystem(null), - } - - if (item.subsystemName === selectedSubsystem) { - out.style = tableStyle - } - - return out - }, [selectedSubsystem]) - - const onMouseOver = useCallback((_, d) => setSelectedSubsystem(d.name), []) - - const onMouseOut = useCallback(() => setSelectedSubsystem(null), []) - - const afterDraw = useCallback(selection => { - selection.on('mouseover', onMouseOver) - .on('mouseout', onMouseOut) - .classed('selected_graph_column', d => d.name === selectedSubsystem) - }, [onMouseOver, onMouseOut, selectedSubsystem]) - useEffect(() => { invokeWebApiWrapperAsync( async () => { @@ -134,7 +108,6 @@ export const OperationTime = memo(() => { colors={subsystemColors} width={'100%'} height={'50vh'} - afterDraw={afterDraw} />