diff --git a/src/components/d3/monitoring/D3HorizontalCursor.tsx b/src/components/d3/monitoring/D3HorizontalCursor.tsx index 335475d..4466254 100644 --- a/src/components/d3/monitoring/D3HorizontalCursor.tsx +++ b/src/components/d3/monitoring/D3HorizontalCursor.tsx @@ -1,4 +1,4 @@ -import { CSSProperties, ReactNode, SVGProps, useEffect, useMemo, useRef, useState, isValidElement, cloneElement } from 'react' +import { CSSProperties, ReactNode, SVGProps, useEffect, useMemo, useRef, useState } from 'react' import * as d3 from 'd3' import { wrapPlugin } from '@components/d3/plugins/base' @@ -166,7 +166,6 @@ const _D3HorizontalCursor = ({ }) const bodies = groups.map((group) => render(group, chartData)) - .map(body => isValidElement(body) ? cloneElement(body, {className: 'tooltip-body' }) : body) setTooltipBodies(bodies) }, [groups, data, yAxis, lineY, fixed, mouseState.visible]) @@ -180,7 +179,7 @@ const _D3HorizontalCursor = ({ { {getChartIcon(chart)} {chart.shortLabel || chart.label} - {xFormat(chart)} + {xFormat(chart)} ) })} diff --git a/src/styles/d3.less b/src/styles/d3.less index daadea4..6ec1bb0 100644 --- a/src/styles/d3.less +++ b/src/styles/d3.less @@ -99,13 +99,6 @@ } } } - - & .tooltip-body { - - & > div:nth-child(n+3):nth-child(3n+1) { - text-align: end; - } - } } }