Files
Randell Dawson 1494a50123 fix(guide): restructure curriculum guide articles (#36501)
* fix: restructure certifications guide articles
* fix: added 3 dashes line before prob expl
* fix: added 3 dashes line before hints
* fix: added 3 dashes line before solutions
2019-07-24 13:29:27 +05:30

743 B

title
title
Create a Scatterplot with SVG Circles

Create a Scatterplot with SVG Circles


Hints

Hint 1

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

Hint 2

Append circles in the append() method.


Solutions

Solution 1 (Click to Show/Hide)

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.