Вращение меток радиолокационной карты d3.js
Я пытаюсь создать радиолокационную карту с метками, повернутыми вдоль линий радара, как на этом изображении: https://i.imgur.com/3SPdhb9.png
Текущий код:
axis.append("text")
.attr("class", "legend")
.text(function(d){return d})
.style("font-family", "sans-serif")
.style("font-size", "11px")
.attr("text-anchor", "middle")
.attr("dy", "1.5em")
.attr("transform", function(d, i){return "translate(0, -10)";})
.attr("x", function(d, i){return w/2*(1- factorLegend*Math.sin(i*radians/total))-60*Math.sin(i*radians/total);})
.attr("y", function(d, i){return h/2*(1-Math.cos(i*radians/total))-20*Math.cos(i*radians/total);});
Заранее большое спасибо!