Visualize Data with a Heat Map

why does the data above 1753 of each month not show in the bar chart except December .there is no problem passing testcases.but only the above problem i mention.and if there is away to add border color on mouseover without using tip method let me know?here is the link to the code: https://codepen.io/ayexayex/pen/OJELbyE

You’re missing 11 months and your legend is 11 squares; not a coincidence. This

  svgCont.selectAll('rect')
  .data(data.monthlyVariance)

is using the wrong selector since there are already rects in the visualization.

You can access the element which starts the mouse events in D3 with event.target (as in .on('mouseover', (event, datum) => {...}) etc.), select them and style them as you wish.

thanks a lot :pray:
additionally if you see on the given example( https://heat-map.freecodecamp.rocks.) if you mouseover on a specific month you will notice the month on the tooltip is slightly different.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.