Test #8 on scatterplot project...stuck

Can someone take a look at my code and tell me what why I can’t pass user story #8? I pass the previous 3 that have to do with the positioning of the circles via the time and year fields of the JSON data. Everything lines up but the tests doesn’t pass?

Link to my codepen: https://codepen.io/anon/pen/YRYENW?editors=0010

These are the circles that I am appending to the svg.

  .attr("cx", d => xScale(d["Year"]))
  .attr("cy", d => yScale(minSecParse(d["Time"])))
  .attr("r", 5)
  .attr("class", "dot")
  .attr("data-xvalue", d => d["Year"])
  .attr("data-yvalue", d => yScale(minSecParse(d["Time"])))
  .attr("transform", `translate(${pad}, 0)`);

Thank you for reading my post. I look forward to your advice/solutions

Try to invert the cy values.

.attr('cy', d => h - yScale(minSecParse(d.Time))
1 Like

Wow! i didn’t even realize that my values were upside down.

Thank you,