Data Visualization with D3 - Change the Presentation of a Bar Chart

Tell us what’s happening:

what is the problem? i have done all thing mentioned in question and eventhrough i copied and pasted the solution still i unable to pass the test

Your code so far

<style>
  .bar {
    width: 25px;
    height: 100px;
    margin: 2px;
    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"))
  </script>
</body>

Your browser information:

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

Challenge Information:

Data Visualization with D3 - Change the Presentation of a Bar Chart

I don’t recommend this although I understand it can be part of the learning process.

This code passes for me.

At this point, I would suggest looking at the answers you have in this code, and make sure you understand it. Reset the lesson and implement the changes yourself.

Maybe you accidentally changed something else.