From fee0849ea46c4ad858bfc39b4bdcb0206fbdb6a3 Mon Sep 17 00:00:00 2001 From: ts_salikhov Date: Thu, 13 Oct 2022 14:28:06 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0=D0=BD=20=D0=B3=D1=80=D0=B0=D1=84=D0=B8=D0=BA=20D3Horizon?= =?UTF-8?q?talChart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Telemetry/OperationTime/index.jsx | 30 +-------------------- src/styles/operation_time.less | 5 ---- 2 files changed, 1 insertion(+), 34 deletions(-) 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} /> { dataSource={selectedData} scroll={{ y: '25vh', x: true }} pagination={false} - onRow={onRow} /> ) diff --git a/src/styles/operation_time.less b/src/styles/operation_time.less index 851c178..db5332d 100644 --- a/src/styles/operation_time.less +++ b/src/styles/operation_time.less @@ -1,8 +1,3 @@ .table_color { padding: 5px 0; -} - -.selected_graph_column { - filter: drop-shadow(0px 2px 2px rgba(0, 0, 0, .6)); - transition: all 0.2s ease-out } \ No newline at end of file