Challenge: Change the Presentation of a Bar Chart
Link to the challenge:
https://www.freecodecamp.org/learn/data-visualization/data-visualization-with-d3/change-the-presentation-of-a-bar-chart
<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>