function rAxis(g) {
let gr =
g.attr("class", "r axis")
.selectAll("g")
.data(r.ticks(5).slice(1))
.enter().append("g");
gr.append("circle")
.attr("r", r)
.attr("fill", "none")
.attr("stroke","#777")
.attr("stroke-dasharray", "1,4");
g.selectAll(".axis :last-of-type circle")
.attr("stroke","#333")
.attr("stroke-dasharray", "none");
gr.append("text")
.attr("y", function(d) { return -r(d) - 4; })
.attr("transform", "rotate(10)")
.style("text-anchor", "middle")
.text(function(d) { return d; })
.attr("font-size", 10)
.attr("font-family", "sans-serif");
return gr;
}