Selections, Drill 6

Write the function setCircleRadii to change the radii of the circles to be 10 times the bound value.

<body>
  <div>
    <svg id="svg">
        <circle cx="100" cy="50" r="5" fill="red"></circle>
        <circle cx="130" cy="50" r="5" fill="green"></circle>
        <circle cx="160" cy="50" r="5" fill="blue"></circle>
    </svg>
  </div>
  <script>
    var data = [1, 2, 3];
    d3.selectAll("circle").data(data);
    setCircleRadii(d3.selectAll("circle")); // write this function
  </script>
</body>

Try it

Editor
SVG Output
Messages

  
DOM