Chore: avoid pointer events in viz tooltip (#45492) (#45494)

(cherry picked from commit 685ec5383e)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2022-02-18 10:49:48 +01:00
committed by GitHub
co-authored by Ryan McKinley
parent fe7e1292cb
commit dc3dc215d8
3 changed files with 4 additions and 7 deletions
@@ -23,7 +23,7 @@ export const VizTooltipContainer: React.FC<VizTooltipContainerProps> = ({
position: { x: positionX, y: positionY },
offset: { x: offsetX, y: offsetY },
children,
allowPointerEvents,
allowPointerEvents = false,
className,
...otherProps
}) => {
@@ -271,7 +271,7 @@ export const BarChartPanel: React.FunctionComponent<Props> = ({ data, options, w
<VizTooltipContainer
position={{ x: coords.x, y: coords.y }}
offset={{ x: TOOLTIP_OFFSET, y: TOOLTIP_OFFSET }}
allowPointerEvents
allowPointerEvents={isToolTipOpen.current}
>
{renderTooltip(info.aligned, focusedSeriesIdx, focusedPointIdx)}
</VizTooltipContainer>
+2 -5
View File
@@ -328,11 +328,8 @@ const prepConfig = (
let deg360 = 2 * Math.PI;
// leon forgot to add these to the uPlot's Scale interface, but they exist!
//let xKey = scaleX.key as string;
//let yKey = scaleY.key as string;
let xKey = series.facets![0].scale;
let yKey = series.facets![1].scale;
let xKey = scaleX.key!;
let yKey = scaleY.key!;
let pointHints = scatterInfo.hints.pointSize;
const colorByValue = scatterInfo.hints.pointColor.mode.isByValue;