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} />