From 16ae6959cf3d390665a456524865cb58a92e76c1 Mon Sep 17 00:00:00 2001 From: ts_salikhov Date: Wed, 19 Oct 2022 14:05:32 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=B0=D0=B4=D0=B0=D0=BF=D1=82=D0=B8=D0=B2?= =?UTF-8?q?=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D1=88=D1=80=D0=B8=D1=84=D1=82?= =?UTF-8?q?=D0=B0=20=D0=B2=20=D0=BF=D0=BE=D0=B4=D1=81=D0=BA=D0=B0=D0=B7?= =?UTF-8?q?=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../d3/monitoring/D3HorizontalCursor.tsx | 4 +- .../d3/monitoring/D3MonitoringCharts.tsx | 3 -- src/pages/Telemetry/TelemetryView/index.jsx | 1 - src/styles/d3.less | 37 ++----------------- 4 files changed, 4 insertions(+), 41 deletions(-) diff --git a/src/components/d3/monitoring/D3HorizontalCursor.tsx b/src/components/d3/monitoring/D3HorizontalCursor.tsx index ed0802f..3ad8b24 100644 --- a/src/components/d3/monitoring/D3HorizontalCursor.tsx +++ b/src/components/d3/monitoring/D3HorizontalCursor.tsx @@ -22,7 +22,6 @@ export type D3HorizontalCursorSettings = { style?: CSSProperties limit?: number lineStyle?: SVGProps - adaptiveTooltipSmall?: boolean } export type D3HorizontalCursorProps = D3HorizontalCursorSettings & { @@ -73,7 +72,6 @@ const _D3HorizontalCursor = ({ style: _style = {}, limit = 2, lineStyle: _lineStyle, - adaptiveTooltipSmall = false, data, groups, @@ -191,7 +189,7 @@ const _D3HorizontalCursor = ({ style={{ transition: 'opacity .1s ease-out', userSelect: fixed ? 'auto' : 'none' }} >
-
diff --git a/src/components/d3/monitoring/D3MonitoringCharts.tsx b/src/components/d3/monitoring/D3MonitoringCharts.tsx index ba990f1..dbc2a54 100644 --- a/src/components/d3/monitoring/D3MonitoringCharts.tsx +++ b/src/components/d3/monitoring/D3MonitoringCharts.tsx @@ -142,7 +142,6 @@ export type D3MonitoringChartsProps = Omit void }) => void @@ -192,7 +191,6 @@ const _D3MonitoringCharts = >({ dash, chartName, methods, - adaptiveTooltipSmall = false, className = '', ...other @@ -572,7 +570,6 @@ const _D3MonitoringCharts = >({ spaceBetweenGroups={spaceBetweenGroups} data={data} height={height} - adaptiveTooltipSmall={adaptiveTooltipSmall} /> diff --git a/src/pages/Telemetry/TelemetryView/index.jsx b/src/pages/Telemetry/TelemetryView/index.jsx index 1b0dd8d..afa3859 100755 --- a/src/pages/Telemetry/TelemetryView/index.jsx +++ b/src/pages/Telemetry/TelemetryView/index.jsx @@ -302,7 +302,6 @@ const TelemetryView = memo(() => { }, }} height={'70vh'} - adaptiveTooltipSmall /> diff --git a/src/styles/d3.less b/src/styles/d3.less index b497840..e7ff344 100644 --- a/src/styles/d3.less +++ b/src/styles/d3.less @@ -14,11 +14,11 @@ max-width: 100%; height: 100%; - - font-size: 13px; + + font-size: calc(7px + 6 * (100vw - 1024px) / 896); color: @color; position: absolute; - padding: 5px; + padding: calc(0px + 5 * (100vw - 1024px) / 896); border: none; border-radius: 2px; background-color: @bg-color; @@ -119,35 +119,4 @@ .grid-line:not(:first-of-type):not(:last-of-type) line { stroke: #ddd; stroke-dasharray: 4; -} - -@media (max-width: 1800px) { - .asb-d3-chart .adaptive-tooltip { - font-size: 11px; - } -} - -@media (max-width: 1600px) { - .asb-d3-chart .adaptive-tooltip { - font-size: 9px; - } -} - -@media (max-width: 1440px) { - .asb-d3-chart .adaptive-tooltip { - font-size: 8px; - padding: 0; - } -} - -@media (max-width: 1310px) { - .asb-d3-chart .adaptive-tooltip-small { - font-size: 7px; - } -} - -@media (max-width: 1279px) { - .asb-d3-chart .adaptive-tooltip-small { - font-size: 6px; - } } \ No newline at end of file