Tell us what’s happening:
Your code so far
<style>
.bar {
width: 25px;
height: 100px;
/* Only change code below this line */
margin: 2px;
/* Only change 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) => (10*d + "px"))
</script>
</body>
Your browser information:
User Agent is: Mozilla/5.0 (X11; CrOS x86_64 13421.89.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36
.
Challenge: Change the Presentation of a Bar Chart
Link to the challenge: