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

pull/44080/head
Ryan McKinley 3 years ago committed by GitHub
parent 50a53ef58b
commit 685ec5383e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/grafana-ui/src/components/VizTooltip/VizTooltipContainer.tsx
  2. 2
      public/app/plugins/panel/barchart/BarChartPanel.tsx
  3. 7
      public/app/plugins/panel/xychart/scatter.ts

@ -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>

@ -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;

Loading…
Cancel
Save