From d869a4348300765c7fce305d7a32799a01b54a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EC=8A=B9=EC=9A=B0?= Date: Mon, 22 Jul 2024 16:20:28 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix(view):=20bar=20chart=20tooltip=EC=97=90?= =?UTF-8?q?=20=EB=A7=88=EC=9A=B0=EC=8A=A4=20Over=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=ED=98=84=EC=83=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/Statistics/AuthorBarChart/AuthorBarChart.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.tsx b/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.tsx index b11a8890..4faa2ed7 100644 --- a/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.tsx +++ b/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.tsx @@ -84,7 +84,7 @@ const AuthorBarChart = () => { const handleMouseMove = (e: MouseEvent, d: AuthorDataType) => { tooltip .style("left", `${e.pageX - 70}px`) - .style("top", `${e.pageY - 70}px`) + .style("top", `${e.pageY - 90}px`) .html( `

${d.name}

${metric}: From cedb077b308b42f9a0c69748d36d3549464df4ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EC=8A=B9=EC=9A=B0?= Date: Mon, 22 Jul 2024 16:31:03 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix(view):=20=EA=B0=84=ED=97=90=EC=A0=81?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=A7=88=EC=9A=B0=EC=8A=A4=EA=B0=80=20too?= =?UTF-8?q?l=20tip=20=EC=9C=84=EC=97=90=20=EC=9C=84=EC=B9=98=ED=96=88?= =?UTF-8?q?=EC=9D=84=20=EB=95=8C=20=EA=B9=9C=EB=B9=A1=EC=9D=B4=EB=8A=94=20?= =?UTF-8?q?=ED=98=84=EC=83=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Statistics/AuthorBarChart/AuthorBarChart.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.tsx b/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.tsx index 4faa2ed7..b1aae6d9 100644 --- a/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.tsx +++ b/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.tsx @@ -78,11 +78,9 @@ const AuthorBarChart = () => { .text(`${metric} # / Total ${metric} # (%)`); // Event handler - const handleMouseOver = () => { - tooltip.style("display", "inline-block"); - }; - const handleMouseMove = (e: MouseEvent, d: AuthorDataType) => { + const handleMouseOver = (e: MouseEvent, d: AuthorDataType) => { tooltip + .style("display", "inline-block") .style("left", `${e.pageX - 70}px`) .style("top", `${e.pageY - 90}px`) .html( @@ -96,6 +94,10 @@ const AuthorBarChart = () => {

` ); }; + + const handleMouseMove = (e: MouseEvent) => { + tooltip.style("left", `${e.pageX - 70}px`).style("top", `${e.pageY - 90}px`); + }; const handleMouseOut = () => { tooltip.style("display", "none"); };