From ec4f33919c1383414b68f3a4572fc4f2cb84d791 Mon Sep 17 00:00:00 2001 From: Shahan Nedadahandeh Date: Wed, 30 Nov 2022 18:35:42 -0500 Subject: [PATCH] Fixed WordCloud not displaying values correctly (#95) Co-authored-by: shahanneda Reviewed-on: https://git.csclub.uwaterloo.ca/www/cs-2022-class-profile/pulls/95 Reviewed-by: Mark Chiu --- components/WordCloud.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/WordCloud.tsx b/components/WordCloud.tsx index fb09684..2a68a80 100644 --- a/components/WordCloud.tsx +++ b/components/WordCloud.tsx @@ -216,7 +216,10 @@ const WordCloudWords: React.FC = ({ if (word.text) { showTooltip( - { text: word.text, value: data[index].value }, + { + text: word.text, + value: (cloudWords[index] as WordData).value, + }, eventSvgCoords.x - word.text.length * TOOLTIP_HORIZONTAL_SHIFT_SCALER + alignmentOffset,