[Tex/LaTex] Label following arrow in TikZ

tikz-pgf

I want to write diagonal arrows, with the label lay down to the arrow.

Something like this:

enter image description here

Here is my best attempt, but it does not work

\documentclass{article}
\usepackage{tikz}

\begin{document}
  \begin{tikzpicture}
    \node (A) at (0,0) {$\bullet$};
    \node (B) at (-2,-1) {$\bullet$};
    \draw[thick,->] (A) -- (B) node[midway,sloped,rotate=270] {$\frac 34$};
  \end{tikzpicture}
\end{document}

I just get this:

enter image description here

Best Answer

Just add left. Normally you'd want above, but because of the rotation you need left.

enter image description here

\documentclass{article}
\usepackage{tikz}

\begin{document}
  \begin{tikzpicture}
    \node (A) at (0,0) {$\bullet$};
    \node (B) at (-2,-1) {$\bullet$};
    \draw[thick,->] (A) -- (B) node[midway,sloped,left,rotate=270] {$\frac{3}{4}$};
  \end{tikzpicture}
\end{document}