Change the Presentation of a Bar Chart (Data Visualization With D3)

Tell us what’s happening:
I think there’s a glitch somewhere on the testing of this particular topic https://www.freecodecamp.org/learn/data-visualization/data-visualization-with-d3/change-the-presentation-of-a-bar-chart#

It wanted each of the datasets in an array to be multiplied by 10 and also shown on the chart.

But it’s displaying such result and all of the test aren’t passing

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")
    // Add your code below this line
    .style("height", (d) => (d*10 + "px")

    )

    // Add your code above 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/86.0.4240.198 Safari/537.36.

Challenge: Change the Presentation of a Bar Chart

Link to the challenge:

I copy pasted your code and I did pass all tests without changing anything. Maybe try restarting the challenge or refreshing the page. Sometimes disabling browser extensions also helps.

Okay. Thank you very much

I just increased the zoom page from 65% to 75% and it worked. Thank you so much

1 Like