I'm trying to align three labeled circles horizontally. Using absolute positions works although I would want to have a margin between the circles and its labels. However I think it would be nice to be able to position it relative to each other since the label lengths are variable.
I'm currently using the positioning library of tikz but apparently it can't position relative to a filldraw
command or I'm just using it incorrectly. It just places the circles on top of each other. I really don't have much experience using tikz, so any help is much appreciated!
MWE:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
% absolute
\begin{tikzpicture}[scale=0.50]
\filldraw[fill=white!40!red,thin] (0,0) circle (12pt)
node[anchor=west] {= executing};
\filldraw[fill=white!40!yellow,thin] (8,0) circle (12pt)
node [anchor=west]{=ready};
\filldraw[fill=white!40!green,thin] (14,0) circle (12pt)
node[anchor=west]{=stalling};
\end{tikzpicture}
% relative
\begin{tikzpicture}[scale=0.50]
\filldraw[fill=white!40!red,thin] (0,0) circle (12pt);
\node[right = 6pt] {= executing};
\filldraw[fill=white!40!yellow,thin, right = 24pt] circle (12pt);
\node [right = 6pt]{=ready};
\filldraw[fill=white!40!green,thin, right = 24pt] circle (12pt);
\node[right = 6pt]{=stalling};
\end{tikzpicture}
\end{document}