{
let svg = html`<svg></svg>`;
let colors = {'goal' : "#AAFFAA",
'miss' : "#FFAAAA",
'post' : "#CCCCCC",
'saved' : "#FFFFAA"}
d3.select(svg)
.attr("width",width)
.attr("height",height);
d3.select(svg).selectAll("circle")
.data(data)
.join("circle")
.attr("cx", d => x(d.time))
.attr("cy", d => y(d.distance))
.attr("r","10")
.attr("stroke","black")
.attr("fill", d => colors[d.type]);
d3.select(svg).append("g")
.attr("transform", "translate(0," + (height - margin.bottom) + ")")
.call(d3.axisBottom(x).ticks(8))
d3.select(svg).append("g")
.attr("transform", "translate(" + margin.left + ")")
.call(d3.axisLeft(y).ticks(8))
return svg;
}