From 1240c15401ef7fd7ce226840b22cb519ee12ce81 Mon Sep 17 00:00:00 2001 From: ts_salikhov Date: Wed, 17 Aug 2022 15:28:07 +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=B2=D1=8B=D1=81=D0=BE=D1=82=D0=B0=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B4=D1=81=D0=BA=D0=B0=D0=B7=D0=BA=D0=B8=20=D0=BA?= =?UTF-8?q?=D1=83=D1=80=D1=81=D0=BE=D1=80=D0=B0=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=B3=D1=80=D0=B0=D1=84=D0=B8=D0=BA=D0=BE=D0=B2=20=D0=BC=D0=BE?= =?UTF-8?q?=D0=BD=D0=B8=D1=82=D0=BE=D1=80=D0=B8=D0=BD=D0=B3=D0=B0=20=D0=B8?= =?UTF-8?q?=20=D0=B0=D1=80=D1=85=D0=B8=D0=B2=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/d3/monitoring/D3HorizontalCursor.tsx | 8 +++++--- src/components/d3/monitoring/D3MonitoringCharts.tsx | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/d3/monitoring/D3HorizontalCursor.tsx b/src/components/d3/monitoring/D3HorizontalCursor.tsx index a8a1d12..44d1ec1 100644 --- a/src/components/d3/monitoring/D3HorizontalCursor.tsx +++ b/src/components/d3/monitoring/D3HorizontalCursor.tsx @@ -139,7 +139,7 @@ const _D3HorizontalCursor = ({ if (!mouseState.visible || fixed) return let top = mouseState.y + offsetY - if (top + height >= sizes.chartsHeight) { + if (top + height / 2 >= sizes.chartsHeight) { setPosition('bottom') top = mouseState.y - offsetY - height } else { @@ -179,14 +179,16 @@ const _D3HorizontalCursor = ({ -
+
{tooltipBodies[i]}
diff --git a/src/components/d3/monitoring/D3MonitoringCharts.tsx b/src/components/d3/monitoring/D3MonitoringCharts.tsx index 5d7f582..18a3261 100644 --- a/src/components/d3/monitoring/D3MonitoringCharts.tsx +++ b/src/components/d3/monitoring/D3MonitoringCharts.tsx @@ -559,6 +559,7 @@ const _D3MonitoringCharts = >({ groups={groups} sizes={sizes} data={data} + height={height} />