I'm trying on my first tikz diagram, and it's working okay, but I've run into some problems and I think that my solution is starting to be more discretionary. Heres my code:
\documentclass[png,border=10pt,tikz]{article}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning,fit,shapes,calc}
\tikzset{
state/.style={
rectangle,
rounded corners,
draw=black, very thick,
minimum height=2em,
inner sep=2pt,
text centered,
},
}
\tikzstyle{line} = [draw, -latex]
\pgfdeclarelayer{bg} % declare background layer
\pgfsetlayers{bg,main}
\begin{document}
\tikzset{
block/.style={draw, fill=white, rectangle, rounded corners,
minimum height=2em, minimum width=10em},
block2/.style={draw, fill=white, rectangle, rounded corners,
minimum height=2em, minimum width=10em},
block3/.style={draw, fill=white, rectangle,
minimum height=4em, minimum width=30em},
}
\begin{tikzpicture}[auto, node distance=2.5cm, >=latex]
\node[block3] (kronos) {Kronos};
\node[block, above of= kronos, anchor=north east] (interbank) {Interbank};
\node[block, above of= kronos, anchor=north west] (pengepolitik) {Pengepolitiske operationer};
\node[block, below = of kronos, anchor=south] (sum) {Sum-, intraday- og Straksclearing};
\node[block, left of = sum] (scp) {SCP};
\node[block, left = of scp] (vp) {VP};
\node[block, right of = sum] (euro) {EuroCCP};
\node[block, right of = euro] (cls) {CLS};
\node[block, below of= vp] (valuta) {Valutahandler};
\node[block, below of= scp] (detail) {Detailhandler};
\node[block, below of= cls] (værdi) {Værdipapirhandler};
\draw[dotted,thick] ($(interbank.north west)+(-0.3,0.3)$) rectangle ($(pengepolitik.south east)+(0.3,-0.3)$);
\draw[dotted,thick] ($(vp.north west)+(-0.3,0.3)$) rectangle ($(cls.south east)+(0.3,-0.3)$);
\path[line] (pengepolitik) -- (kronos);
\path[line] (interbank) -- (kronos);
\path[line] (scp) -- (kronos);
\path[line] (euro) -- (kronos);
\path[line] (vp) -- (kronos);
\path[line] (cls) -- (kronos);
\begin{pgfonlayer}{bg} % select the background layer
\draw[dashed] ($(kronos.west)+(-6,0)$) -- ($(kronos.east)+(6,0)$);
\end{pgfonlayer}
\end{tikzpicture}
\end{document}
Some of my problems are pretty obvious:
But I'm trying to achieve something like this:

Therefor i'm also looking for a way to do the straigth lines instead of lines going to the center of the main figure? Do you have a better solution that I could try to do?
Regards, Frederik.

