D3.js test fail even after using correct code

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**
<style>
.bar {
  width: 25px;
  height: 100px;
  /* Add your code below this line */
  margin: 2px;
  
  /* Add your code above this line */
  display: inline-block;
  background-color: blue;
}
</style>
<body>
<script>
  const dataset = [12, 31, 22, 17, 25, 18, 29, 14, 9];

  d3.select("body").selectAll("div")
    .data(dataset)
    .enter()
    .append("div")
    .attr("class", "bar")
    .style("height", (d) => (d * 10 + "px")) // Change this line
</script>
</body>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.124 Safari/537.36 Edg/102.0.1245.44

Challenge: Change the Presentation of a Bar Chart

Link to the challenge:

Hi @ PriyeshRai, and welcome to the forum!

Your code passes the tests for me.

You might have a browser problem - try disabling any extensions (e.g. ad blockers) or any kind of dark theme that might be installed.

If that doesn’t help, try using a different browser (I tested your code using Chrome).

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