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

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

Hello verybody!
Someone can help me? I don’t understand why my code does not run.
Thanks!

Your code so far

<style>
  .bar {
    width: 25px;
    height: 100px;
    /* Agrega tu código debajo de esta línea */
margin: 2px;


    /* Agrega tu código encima de esta línea */
    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")) // Cambia esta línea
  </script>
</body>

Your browser information:

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

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

Link to the challenge:

What do you mean by does not run? I copied and pasted your code above and pass all the tests. Are you running any 3rd party extensions that might be blocking 3rd party scripts?

1 Like

Hello, thanks!
Yes exactly, I’m running the code but it doesn’t pass, I don’t not why. I’ll see 3rd party extensions
Thanks!