How do one rotate text inside a diagram as shown below. Below is my MWE modified from here
\documentclass[tikz,12pt]{standalone}
\usetikzlibrary{calc,positioning,backgrounds,arrows.meta}
\usepackage{forest}
\pagestyle{empty}
\begin{document}
\begin{forest}
for tree={
child anchor=west,
parent anchor=east,
grow'=east,
draw,
anchor=west,
edge path={
\noexpand\path[\forestoption{edge}]
(.child anchor) -| +(-5pt,0) -- +(-5pt,0) |-
(!u.parent anchor)\forestoption{edge label};
},
}
[Root
[Branch A
[Branch A1
]
[Branch A2
]
]
[Branch B
[Branch B1
]
[Branch B2
]
]
]
\end{forest}
\end{document}
Objective: Rotate as shown in the figure below
edges
library unless you are stuck and can't update. Makes these kinds of edges much simpler.