Update index.md (#19571)
This commit is contained in:
committed by
Randell Dawson
parent
6a781e06da
commit
40a1b43e75
@ -3,8 +3,21 @@ title: Select a Group of Elements with D3
|
||||
---
|
||||
## Select a Group of Elements with D3
|
||||
|
||||
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/data-visualization/data-visualization-with-d3/select-a-group-of-elements-with-d3/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
|
||||
### Hint
|
||||
|
||||
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
|
||||
Use the ``` selectAll() ``` method and chain it with the ``` text() ``` method.
|
||||
|
||||
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
|
||||
### Solution
|
||||
|
||||
```html
|
||||
<body>
|
||||
<ul>
|
||||
<li>Example</li>
|
||||
<li>Example</li>
|
||||
<li>Example</li>
|
||||
</ul>
|
||||
<script>
|
||||
d3.selectAll("li").text("list item")
|
||||
</script>
|
||||
</body>
|
||||
```
|
||||
|
Reference in New Issue
Block a user