Visualize Data with a Treemap Diagram FreeCodeCamp

Im stuk at tooltip. When i log e.pageX and e.pageY is sey undefined and when i log the data "d " it log the index. If i use only oane parameter “d” and i log it i get the data that i need.
My code : https://codepen.io/Ciprian_/pen/jEOajBM?editors=0011
FreeCodeCamp chalenge: https://www.freecodecamp.org/learn/data-visualization/data-visualization-projects/visualize-data-with-a-treemap-diagram

Welcome to the forum!

What worked for me is giving e,d parameters and using event.pageX and event.pageY.

Maybe you can find more info here:
https://d3-graph-gallery.com/graph/interactivity_tooltip.html

https://d3-graph-gallery.com/graph/heatmap_tooltip.html

https://mappingwithd3.com/tutorials/basics/tooltip/

Tx for fast response.
Now position of mouse is log correct. And the data i need i have manage to get it. But the tooltip is tey on position on HTML (down on left). And not moving whit mouse position.
My code now: https://codepen.io/Ciprian_/pen/jEOajBM?editors=0011

Hi, i come back with a update. I have successful finis the project. Main problem was that i have ben using a 5.7 version of d3 library.