Files

33 lines
456 B
Markdown
Raw Normal View History

2018-10-12 15:37:13 -04:00
---
title: Select a Group of Elements with D3
---
# Select a Group of Elements with D3
2018-10-12 15:37:13 -04:00
---
## Hints
### Hint 1
2018-10-12 15:37:13 -04:00
2018-10-17 09:40:23 +05:30
Use the ``` selectAll() ``` method and chain it with the ``` text() ``` method.
2018-10-12 15:37:13 -04:00
---
## Solutions
<details><summary>Solution 1 (Click to Show/Hide)</summary>
2018-10-17 09:40:23 +05:30
```html
<body>
<ul>
<li>Example</li>
<li>Example</li>
<li>Example</li>
</ul>
<script>
d3.selectAll("li").text("list item")
</script>
</body>
```
</details>