Added solution to this exercise (#38074)

* Added solution to this exercise

* fix: changed js to html

Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
This commit is contained in:
Bojan Cvjetkovic
2020-01-21 13:30:06 -05:00
committed by Parth Parth
parent 46e2a1b262
commit 10bd00309a

View File

@ -89,8 +89,34 @@ tests:
## Solution ## Solution
<section id='solution'> <section id='solution'>
```js ```html
// solution required <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>
``` ```
</section> </section>