Add labels to D3 solution

What is your hint or solution suggestion?
/Instead of changing rectangle y coordinate and height by 3 times of d we can change it by 2 times then the result is available clearly on screen./
.attr(“x”, (d, i) => i * 30)
.attr(“y”, (d, i) => h - 2 * d)//change y by 2 times
.attr(“width”, 25)
.attr(“height”, (d, i) => 2 * d)//change height by 2 times
.attr(“fill”, “navy”);

   // Add your code below this line
  .attr("x",(d,i)=> i * 30)

Challenge: Add Labels to D3 Elements

Link to the challenge:

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