Hello campers,please I have headache with this project I can not pass two tests test 10. The data-date attribute and its corresponding bar element should align with the corresponding value on the x-axis. and this test number to in the tooltips
My tooltip should have a “data-date” property that corresponds to the “data-date” of the active area.
please could any one check out my code and help me
If I recall correctly, in the ‘mouseover’ function (potentially the .on(‘mousemove’, function(d) {…}) spot for you since that seems to be where you assign the tooltip text) you feed the data in and give the tooltip an attribute of ‘data-date’ using the same style you used to give each bar a ‘data-date’ attribute.
I find the solution of this user story I was writing the code incorrectly like this tooltip.attr(“data-date”,(d)=>d[0]);
but d is an argument exist in function so I should use it like this tooltip.attr(“data-date”,d[0]);
now I should find the other one test 10