forked from ddrilling/asb_cloud_front
Исправлена высота подсказки курсора для графиков мониторинга и архива
This commit is contained in:
parent
1fb4846dbe
commit
1240c15401
@ -139,7 +139,7 @@ const _D3HorizontalCursor = <DataType,>({
|
||||
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 = <DataType,>({
|
||||
<foreignObject
|
||||
key={`${i}`}
|
||||
width={width}
|
||||
height={height}
|
||||
height={'100%'}
|
||||
x={sizes.groupLeft(i) + (sizes.groupWidth - width) / 2}
|
||||
y={tooltipY}
|
||||
opacity={fixed || mouseState.visible ? 1 : 0}
|
||||
pointerEvents={fixed ? 'all' : 'none'}
|
||||
style={{ transition: 'opacity .1s ease-out', userSelect: fixed ? 'auto' : 'none' }}
|
||||
>
|
||||
<div className={`tooltip ${position} ${className}`}>
|
||||
<div className={`tooltip ${position} ${className}`}
|
||||
style={{height: 'auto', bottom: `${position === 'bottom' ? '0' : ''}`}}
|
||||
>
|
||||
<div className={'tooltip-content'}>
|
||||
{tooltipBodies[i]}
|
||||
</div>
|
||||
|
@ -559,6 +559,7 @@ const _D3MonitoringCharts = <DataType extends Record<string, unknown>>({
|
||||
groups={groups}
|
||||
sizes={sizes}
|
||||
data={data}
|
||||
height={height}
|
||||
/>
|
||||
</D3MouseZone>
|
||||
</svg>
|
||||
|
Loading…
Reference in New Issue
Block a user