Right on Target explainer

The aim of this puzzle: Add the bullseye circle to the target

Walkthrough of the solution: To add a new shape to the screen, you use .append(). The argument of .append() is a string that says what kind of shape you want to create. In this puzzle, it should be a 'circle'. It should have a radius of 30, so set its 'r' attribute to 30. It should also be colored red. You can change the color by setting the 'fill' attribute.

Sample code solution:
(Tap below to reveal)

let outer = svg.append('circle').attr('r',90).attr('fill','red');
let inner = svg.append('circle').attr('r',60).attr('fill','white');
let bullseye = svg.append('circle').attr('r',30).attr('fill','red');

D3 Concepts: .append(), .attr('fill',), .attr('r',)
Additional Code (hidden code that runs before the puzzle’s code):

var svg = canvas.append('g');
svg.attr('transform',`translate(${window.innerWidth/2},${window.innerHeight/2})`);

I cant get the final attribute (in bullseye) correct. I cant get rid of the second bracket after the r 30.
Screenshot_20200119-160216|281x500

Ok, so I fixed the previous problem but it still won’t work. At least in practice mode i can move on but it’s still frustrating, especially since I have encountered a problem with the next puzzle too :frowning:

It looks like your .attr() is inside the .append(), instead of attached to it, like this:

svg.append('circle'.attr())

instead of this:

svg.append('circle').attr()

Fixing that problem should get you through the puzzle. Good luck!
Ben