translate - svg text translating and moving are not correct -


it's part of code roate each text.

         .selectall("text")            .attr("y", 0)            .attr("x", 9)            .attr("dy", ".35em")            .style("text-anchor", "start")            .attr("transform", function(d) {               return "rotate(90)";            }) 

it seems works don't know why

.attr("y", 0) 

is move left , right and

.attr("x", 9) 

is move , down.

and why text set center code, not without .attr("y", 0) line.

you have rotated text 90 degrees. now, if move text "right" increasing x coordinate, move downwards (because of 90 degree rotation)


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -