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,