From 0e6a0888d8ecfba98b987073b2ffac617c70a02a Mon Sep 17 00:00:00 2001 From: ts_salikhov Date: Tue, 6 Sep 2022 14:53:44 +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=D1=88=D0=B8=D1=80=D0=B8=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=B2=D1=81=D0=BF=D0=BB=D1=8B=D0=B2=D0=B0=D1=8E=D1=89=D0=B5?= =?UTF-8?q?=D0=B9=20=D0=BF=D0=BE=D0=B4=D1=81=D0=BA=D0=B0=D0=B7=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=BD=D0=B0=20=D0=B3=D1=80=D0=B0=D1=84=D0=B8=D0=BA=D0=B5=20?= =?UTF-8?q?=D0=A2=D0=B5=D0=BB=D0=B5=D0=BC=D0=B5=D1=82=D1=80=D0=B8=D1=8F=20?= =?UTF-8?q?-=20=D0=9C=D0=BE=D0=BD=D0=B8=D1=82=D0=BE=D1=80=D0=B8=D0=BD?= =?UTF-8?q?=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../d3/monitoring/D3HorizontalCursor.tsx | 2 +- src/pages/Telemetry/Archive/index.jsx | 2 +- src/styles/d3.less | 58 ++++++++++++------- 3 files changed, 39 insertions(+), 23 deletions(-) diff --git a/src/components/d3/monitoring/D3HorizontalCursor.tsx b/src/components/d3/monitoring/D3HorizontalCursor.tsx index af75ff0..eb1e7e2 100644 --- a/src/components/d3/monitoring/D3HorizontalCursor.tsx +++ b/src/components/d3/monitoring/D3HorizontalCursor.tsx @@ -186,7 +186,7 @@ const _D3HorizontalCursor = ({ pointerEvents={fixed ? 'all' : 'none'} style={{ transition: 'opacity .1s ease-out', userSelect: fixed ? 'auto' : 'none' }} > -
diff --git a/src/pages/Telemetry/Archive/index.jsx b/src/pages/Telemetry/Archive/index.jsx index 4db24f0..4f27bcc 100755 --- a/src/pages/Telemetry/Archive/index.jsx +++ b/src/pages/Telemetry/Archive/index.jsx @@ -255,7 +255,7 @@ const Archive = memo(() => { plugins={{ menu: { enabled: false }, cursor: { - width: 220, + width: 230, render: cursorRender, } }} diff --git a/src/styles/d3.less b/src/styles/d3.less index 3bc9dc6..62ca5c7 100644 --- a/src/styles/d3.less +++ b/src/styles/d3.less @@ -9,10 +9,6 @@ width: 100%; height: 100%; - - left: 0; - right: 0; - margin: 0 auto; font-size: 13px; color: @color; @@ -113,31 +109,51 @@ width: 100%; height: 100%; } + + & .adaptive-tooltip { + left: 0; + right: 0; + margin: 0 auto; + } } -@media (max-width: 1800px) { - .asb-d3-chart { - & .tooltip { - width: 190px; - font-size: 10px; - } +@media (max-width: 1830px) { + .asb-d3-chart .adaptive-tooltip { + max-width: 190px; + font-size: 10px; } } @media (max-width: 1600px) { - .asb-d3-chart { - & .tooltip { - width: 160px; - font-size: 8px; - } + .asb-d3-chart .adaptive-tooltip { + max-width: 160px; + font-size: 8px; } } -@media (max-width: 1400px) { - .asb-d3-chart { - & .tooltip { - width: 140px; - font-size: 7px; - } +@media (max-width: 1420px) { + .asb-d3-chart .adaptive-tooltip { + max-width: 140px; + font-size: 7px; + padding: 0; + } +} + +@media (max-width: 1300px) { + .asb-d3-chart .adaptive-tooltip { + max-width: 125px; + } +} + +@media (max-width: 1200px) { + .asb-d3-chart .adaptive-tooltip { + max-width: 105px; + font-size: 6px; + } +} + +@media (max-width: 1100px) { + .asb-d3-chart .adaptive-tooltip { + max-width: 90px; } } \ No newline at end of file