From e54c7d969e33731e58b7160aa113087a1257d6e7 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Wed, 28 Dec 2022 15:20:53 -0500 Subject: [PATCH] Update some types --- packages/d3tooltip/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/d3tooltip/src/index.ts b/packages/d3tooltip/src/index.ts index bdba4d7b..b346be4f 100644 --- a/packages/d3tooltip/src/index.ts +++ b/packages/d3tooltip/src/index.ts @@ -85,8 +85,8 @@ export function tooltip< ) => ''; let styles = {}; - let el: Selection; - const anchor: Selection = + let el: Selection; + const anchor: Selection = root || d3.select('body'); const rootNode = anchor.node()!; @@ -107,7 +107,7 @@ export function tooltip< top: `${y}px`, ...styles, }) - .html(() => text(node)) as Selection; + .html(() => text(node)); }); selection.on('mousemove.tip', (node) => {