I have the following chart in tikz
. I need to draw an arrow that starts horizontal then goes vertical from the decision shape to the end with label no
. I have tried using -|
instead of --
but this generated an error.
1) How to draw the arrow (like the red arrow I added for illustration?
2) How to reduce the width of the io
shape (\tikzstyle{io}
)?
And my script:
\documentclass[10pt]{llncs}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}
\title{title}
\author{Authors here\\
\small{Department here}\\
\small{University here, Country}\\
}
\date{}
\begin{document}
\maketitle
\section{Chart}
\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30]
\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30]
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30]
\tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=green!30]
\tikzstyle{arrow} = [thick,->,>=stealth]
\begin{tikzpicture}[node distance=2cm]
\node (start) [startstop] {Start};
\node (in01) [io, below of = start] {xxxxxxx xxxx};
\node (proc01) [process, below of = in01] {aaaaaaa aaaaaaa aaaaaaa};
\node (proc02) [process, below of = proc01] {ccccccc};
\node (dec01) [decision, below of = proc02] {bbb-bb?};
\node (proc03) [process, below of = dec01, , yshift=-0.5cm] {aaaaaaa aaaaaaa aaaaaaa};
\node (proc04) [process, below of = proc03] {ccccccc};
\node (end) [startstop, below of = proc04] {End};
\draw [arrow] (start) -- (in01);
\draw [arrow] (in01) -- (proc01);
\draw [arrow] (proc01) -- (proc02);
\draw [arrow] (proc02) -- (dec01);
\draw [arrow] (dec01) -- node[anchor=east]{Yes} (proc03);
%\draw [arrow] (dec01) -- node[anchor=east]{No} (end);
\draw [arrow] (proc03) -- (proc04);
\draw [arrow] (proc04) -- (end);
\end{tikzpicture}
\end{document}