Tell us what’s happening:
i just did this not 5min ago on the previous challenge and it worked. now even following the solution, its not working
Your code so far
<style>
.bar {
width: 25px;
height: 100px;
/* Only change code below this line */
margin: 2px;
.style("height", (d) => (d * 10 + "px"))
/* 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) => (d + "px")) <---- (offending code)
</script>
</body>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0
.
Challenge: Change the Presentation of a Bar Chart
Link to the challenge: