diff --git a/src/components/d3/monitoring/D3HorizontalCursor.tsx b/src/components/d3/monitoring/D3HorizontalCursor.tsx index c2ee50d..ed0802f 100644 --- a/src/components/d3/monitoring/D3HorizontalCursor.tsx +++ b/src/components/d3/monitoring/D3HorizontalCursor.tsx @@ -22,6 +22,7 @@ export type D3HorizontalCursorSettings = { style?: CSSProperties limit?: number lineStyle?: SVGProps + adaptiveTooltipSmall?: boolean } export type D3HorizontalCursorProps = D3HorizontalCursorSettings & { @@ -72,6 +73,7 @@ const _D3HorizontalCursor = ({ style: _style = {}, limit = 2, lineStyle: _lineStyle, + adaptiveTooltipSmall = false, data, groups, @@ -189,7 +191,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 dbc2a54..ba990f1 100644 --- a/src/components/d3/monitoring/D3MonitoringCharts.tsx +++ b/src/components/d3/monitoring/D3MonitoringCharts.tsx @@ -142,6 +142,7 @@ export type D3MonitoringChartsProps = Omit void }) => void @@ -191,6 +192,7 @@ const _D3MonitoringCharts = >({ dash, chartName, methods, + adaptiveTooltipSmall = false, className = '', ...other @@ -570,6 +572,7 @@ 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 afa3859..1b0dd8d 100755 --- a/src/pages/Telemetry/TelemetryView/index.jsx +++ b/src/pages/Telemetry/TelemetryView/index.jsx @@ -302,6 +302,7 @@ const TelemetryView = memo(() => { }, }} height={'70vh'} + adaptiveTooltipSmall /> diff --git a/src/styles/d3.less b/src/styles/d3.less index 90db40d..b497840 100644 --- a/src/styles/d3.less +++ b/src/styles/d3.less @@ -141,13 +141,13 @@ } @media (max-width: 1310px) { - .asb-d3-chart .adaptive-tooltip { + .asb-d3-chart .adaptive-tooltip-small { font-size: 7px; } } @media (max-width: 1279px) { - .asb-d3-chart .adaptive-tooltip { + .asb-d3-chart .adaptive-tooltip-small { font-size: 6px; } } \ No newline at end of file