Tell us what’s happening:
Hi everybody. I was using d3 (v6.5.0) from google libs. In d3 version 4.2.2, the following code part works magically.
.on(‘mouseover’, function (d, i){…
where d is the data value and the i is the index value. However, when I use v6.5.0, d becomes an event object and i becomes data value. I can’t access the index value.
Your code so far
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 Edg/88.0.705.63
.
Challenge: Visualize Data with a Bar Chart
Link to the challenge: