7.2 Task 10 Review

7.2.1 From Day 34

  • 10-2. How to interpret the results of 10-2 in console? I didn’t know.

  • 10-3. There shouldn’t be any space between rect: and hover.

  • 10-7.

    • .attr("transform", (d, i) => "translate(...)")

    • Why didn’t the following work? Why did I have to use transform? I didn’t understand.

svg.selectAll("g")
   .data(dataset)
   .enter()
   .append("g")
   .attr("x", (d, i) => xScale(i))
  • I tried Scott Murray’s codes implementing SVG element tooltips, but they didn’t work. Here is the solution to this problem.