Files
The Coding Aviator f46e517eb7 Added D3 solution to scatterplot challenge (#19609)
* Update index.md

* Update index.md
2018-10-17 22:04:35 +05:30

653 B

title
title
Create a Scatterplot with SVG Circles

Create a Scatterplot with SVG Circles

Hint 1

Use the data(), enter(), and append() methods.

Hint 2

Append circles in the append() method.

Solution

Chain the following lines of code in the svg.selectAll("circle") chain:

  .data(dataset)
  .enter()
  .append("circle")

The svg.selectAll("circle") chain should look like:

  svg.selectAll("circle")
  .data(dataset)
  .enter()
  .append("circle")
Note

The circles won't be visible because we haven't set their attributes yet. We'll do that in the next challenge.