How can I draw this organizational chart?
This is some sort of a minimal damage proposal in which I leave as much as possible intact of your code. What I change, however, is that the nodes are being placed relative to each other with the positioning library. I guess switching to forest may allow one to present a much more elegant solution but as I said I am doing minimal damage here. UPDATE: I forgot to mention that all the accented characters do not show even though I compile with xelatex
. But I am assuming you now how to deal with that. I also made some further simplifications like replacing the tabular
environments and \color{white}
by their TikZ equivalents.
\documentclass[headings=big,twoside,chapterprefix=true,fleqn]{scrreprt}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage{pdflscape}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{landscape}
\begin{figure}
\centering
\tikzset{onode/.style={fill=orange!90,text=white},gnode/.style={fill=gray!30}}
\begin{tikzpicture}[every node/.append style={draw,align=center},node
distance=1cm,font=\sffamily]
\begin{scope}[xscale=3.5,yscale=2]
\node (PDG) at (0,6) [rectangle,draw] {PDG};
\node[below left=1cm of PDG,anchor=east] (CE) {Comité exécutif};
\node[below right=1cm of PDG,dashed,anchor=west] (CET) {Comité d'éthique};
\node[below=of CE.east,gnode,anchor=east] (SG) {Secrétariat Général};
\node[below=of CET.west,anchor=west,gnode] (C) {Cabinet};
\node[below=of SG.east,onode,anchor=east] (AC){Affaires Corporatives};
\node[below=of C.west,anchor=west,gnode] (AeC) {Audit et Conformité};
\node[below=of AC.east,onode,anchor=east] (TO) {Transformation Office};
\node[below=of AeC.west,anchor=west,gnode] (SIE) {Sûreté interne\\d'établissement};
\node[below=of TO.east,onode,anchor=east] (DC) {Direction Communication};
\node[below=of SIE.west,anchor=west,gnode] (Con) {Conseillers};
%
\path (DC) -- (Con) coordinate[midway,yshift=-2cm] (dummy) -- ++(-0.5cm,0)
coordinate (dummy2);
\node[left=1cm of dummy,gnode] (RH){Ressources\\Humaines};
\node[left=of RH,gnode] (F) {Finance};
\node[left=of F,gnode] (SPE) {Stratégie,\\Panification\\ \& Économie};
\node[right=1cm of dummy,onode] (PL) {Procurement \\$\&$ Logistique};
\node[right=of PL,onode] (RN) { Ressources \\$\&$ Nouvelles};
\node[right=of RN,gnode] (J) {Juridique };
%
\node[below=2cm of dummy,anchor=west,gnode] (SSE) {Santé, Sécurité \\$\&$ Environnement};
\node[right=1.5cm of SSE,onode] (EPM) { Engineering $\&$\\ Project \\ Management};
\node[right=1.5cm of EPM,gnode] (RD) { Recherche $\&$\\ Développement};
\node[left=1.5cm of SSE,gnode] (BDM) {Business\\Développment\\Marketing};
\node[left=1.5cm of BDM,gnode] (DSE) {Digitalisation et\\Systèmes\\d'Information};
%
\coordinate[below=1cm of DSE] (dummy3);
\coordinate (dummy4) at (dummy3 -| dummy);
\node[gnode] (LS) at (dummy4) {Liquéfaction et Séparation};
\node[right=of LS,onode] (RP) {Raffinage et Pétrochimie};
\node[right=of RP,gnode] (COM) {Commercialisation};
\node[left=of LS,gnode] (TC) {Transport par Canalisation};
\node[left=of TC,gnode] (EP) {Exploration-Production};
%draw :
\draw (CE) -- (CET);
\draw (SG) -- (C);
\draw (AC) -- (AeC);
\draw (TO) -- (SIE);
\draw (DC) -- (Con);
% new draw
\draw (PDG) -- ([yshift=0.5cm]dummy) coordinate (dummy5);
\foreach \X in {RH,F,SPE,PL,RN,J,SSE.155,EPM.40,RD,BDM.130,DSE.48}
{\draw (dummy5) -| (\X);}
\draw (dummy5) -| ([xshift=-0.15cm,yshift=0.3cm]dummy4) coordinate (dummy6);
\foreach \X in {LS,RP,COM,TC,EP}
{\draw (dummy6) -| (\X);}
\end{scope}
\end{tikzpicture}
\end{figure}
\end{landscape}
\end{document}
with some effort to make code more short and concise by use of tikz
libraries calc
, chains
and positioning
:
\documentclass[headings=big,twoside,chapterprefix=true,fleqn]{scrreprt}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage{pdflscape}
\usepackage{tikz}
\usetikzlibrary{babel, calc, chains, positioning}
\begin{document}
\begin{landscape}
\begin{figure}
\centering
\tikzset{}
\begin{tikzpicture}[
node distance = 2mm and 4mm,
start chain = A going below,
start chain = B going right,
base/.style = {inner sep=1mm,
align=flush center, font=\sffamily\linespread{.84}\selectfont},
bnode/.style = {base, fill=black!80, text = white},
gnode/.style = {base, fill=gray!30},
onode/.style = {base, fill=orange!90, text=white},
]
\begin{scope}[every node/.append style={minimum height=11mm, text width=32mm,on chain=A}]
\node (PDG) [bnode] {PDG};
\node (CE) [base, draw, dashed, below left=of PDG] {Comité exécutif};
\node (SG) [gnode] {Secrétariat Général};
\node (AC) [onode] {Affaires Corporatives};
\node (TO) [gnode] {Transformation Office};
\node (DC) [onode] {Direction Communication};
\node (CET) [base, draw, dashed, below right=of PDG] {Comité d'éthique};
\node (C) [gnode] {Cabinet};
\node (AeC) [gnode] {Audit et Conformité};
\node (SIE) [gnode] {Sûreté interne d'établissement};
\node (Con) [gnode] {Conseillers};
\foreach \L/\R in {CE/CET, SG/C, AC/AeC, TO/SIE, DC/Con}{\draw (\L) -- (\R);}
\end{scope}
%%%%
\begin{scope}[node distance=4mm and 4mm,
every node/.append style={minimum height=13mm,text width=24mm,on chain=B}]
\coordinate[below=of PDG |- DC.south] (aux1);
\node (SPE) [gnode,below left=4mm and 62mm of aux1] % 58mm=2x(24+2)mm+2x4mm+2mm
{Stratégie, Panification \& Économie};
\node (F) [gnode] {Finance};
\node (RH) [gnode] {Ressources Humaines};
\node (PL) [onode] {Procurement $\&$ Logistique};
\node (RN) [onode] {Ressources $\&$ Nouvelles};
\node (J) [gnode] {Juridique };
\draw[thick] (PDG) -- (aux1) -- (aux1 -| SPE)
(aux1) -- (aux1 -| J) ;
%
\node (SSE) [gnode, below=of $(SPE.south)!0.5!(F.south)$]
{Digitalisation et Systèmes d'Information};
\node (BDM) [gnode] {Business Développment Marketing};
\node (DSE) [gnode, below=of $(PL.south)!0.5!(RN.south)$]
{Santé, Sécurité $\&$ Environnement};
\node (EPM) [onode] {Engineering $\&$ Project \\ Management};
\node (RD) [gnode] {Recherche $\&$ Développement};
%
\foreach \x in {SPE, F,RH, PL, RN, J,
SSE, BDM,DSE, EPM}{\draw (\x |- aux1) -- (\x);}
\draw (aux1-| J) -| (RD);
\end{scope}
%%%%
\begin{scope}[node distance=4mm and 4mm,
every node/.append style={minimum height=11mm,text width=32mm,on chain=B}]
\coordinate[below=of PDG |- SSE.south] (aux2);
\node (EP) [gnode,below left=4mm and 59mm of aux2] % 58mm=1x(32+2)mm+2x4mm+34/2mm (LS) at (dummy4)
{Exploration-Production};
\node (TC) [gnode] {Transport par Canalisation};
\node (LS) [gnode] {Liquéfaction et Séparation};
\node (RP) [onode] {Raffinage et Pétrochimie};
\node (COM)[gnode] {Commercialisation};
\draw[thick] (aux1) -- (aux2) -- (aux2 -| EP)
(aux2) -- (aux2 -| COM);
\foreach \x in {EP, TC, LS, RP, COM}{\draw (\x |- aux2) -| (\x);}
\end{scope}
\end{tikzpicture}
\end{figure}
\end{landscape}
\end{document}