-1

my node/jct does not move horizontally/vertically though I am changing x/y--what is the problem

enter image description here

\documentclass[10pt,a4paper]{article}
\usepackage{printlen}
\usepackage{layouts}
\usepackage{titlesec}
\usepackage{multirow, makecell, tabularx, booktabs}
\usepackage{babel}
\usepackage{setspace}
\usepackage{framed}
\usepackage{tgschola}%------------font YES
\usepackage[
  height=8.5in,      % height of the text block
  width=6.5in,       % width of the text block
  top=78pt,        % distance of the text block from the top of the page
  headheight=60pt, % height for the header block
  headsep=12pt,    % distance from the header block to the text block
  heightrounded,   % ensure an integer number of lines
  %showframe,       % show the main blocks
  verbose,         % show the values of the parameters in the log file
]{geometry}
\usepackage{enumitem}
\usepackage[table]{xcolor}                      %for color of table
\usepackage{booktabs}                        %for toprule midrule bottomrule in tables
\usepackage{multirow} % Required for multirows
\usepackage{longtable}
\usepackage{rotating}
\usepackage{lscape}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage[none]{hyphenat}                             %no hyphenation
\usepackage{graphicx}
\usepackage{float}
\usepackage{lastpage}                                     %toget last page number
 \usepackage{indentfirst}
 \usepackage{smartdiagram}
\usepackage{tikz,xcolor}
\usetikzlibrary{shapes, arrows, matrix, calc}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{arrows.meta,quotes,positioning}
\usetikzlibrary{arrows,calc,positioning}
\usetikzlibrary{positioning}
\usetikzlibrary{matrix,fit,calc}
\usepackage{verbatim}
\begin{document}
\begin{landscape}

\begin{tikzpicture}[node distance=2cm]
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=2.5cm, draw=black, fill=blue!20]

\tikzstyle{arrow} = [thick,  ->, >=stealth]

\node (cont)[process]{CONTROLLER};
\node (sqach)[process, below of =cont, xshift=-6cm]{SQAO, Chennai};

\node (sqame)[process, below of =pro1, xshift=6cm]{SQAO, Medak};
\node (vigo)[process, below of =sqach]{Vigilance Offr};
\node (cyso)[process, below of =vigo]{Cyber Security Offr};
\node (rtio)[process, below of =cyso]{RTI Offr};
\node (grio)[process, below of =sqame]{Grievance Offr};
\node (sect)[process, below of =grio]{Secretariat};
\node (hino)[process, below of =sect]{Hindi Offr};
\node (jct)[process, below of =cont, x=6cm]{Jt Controller\\T Wing};
\end{tikzpicture}

\end{landscape}
\end{document}

enter image description here

after using transform command

enter image description here

finally

enter image description here

and the code

\begin{landscape}
% \begin{figure}[H]
% \begin{tikzpicture}[node distance=2cm]
\begin{tikzpicture}[node distance=2cm, transform canvas={scale=0.6}, xshift=600]
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=2.5cm, draw=black, fill=blue!20]

\tikzstyle{arrow} = [thick,  ->, >=stealth]

\node (cont)[process]{CONTROLLER};
%------------
\node (sqach)[process, below of =cont, xshift=-21cm]{SQAO, Chennai};
\node (sqame)[process, below of =sqach]{SQAO, Medak};
%--------------------------
\node (vigo)[process, below of =cont, xshift=-17cm, yshift=0cm]{Vigilance Offr};
\node (cyso)[process, below of =vigo]{Cyber Security Offr};
\node (rtio)[process, below of =cyso]{RTI Offr};
\node (grio)[process, below of =rtio]{Grievance Offr};
\node (sect)[process, below of =grio]{Secretariat};
\node (hino)[process, below of =sect]{Hindi Offr};
%----------------------------------------
\node (jct)[process, below of =cont, xshift=1cm]{Jt Controller\\T Wing};
\node (jcm)[process, right of =jct, xshift=6cm, yshift=0cm]{Jt Controller \\M Wing};
\node (jco)[process, left of =jct, xshift=-6cm, yshift=0cm]{Jt Controller \\O Wing};
\node (jcsa)[process, left of =jct, xshift=-12cm, yshift=0cm]{Jt Controller \\SA Wing};
%--------------------------------------------

\node (dcsa)[process, below of =jcsa, xshift=1.7cm]{Dy Controller};
\node (rdcsa)[process, below of =dcsa, xshift=1.7cm]{QMS\\URC};
%--------------------------
\node (dco)[process, below of =jco, xshift=1.7cm]{Dy Controller};
\node (so)[process, below of =dco, xshift=1.7cm]{Store Offr};
\node (ao)[process, below of =so, yshift=-4cm]{Adm offr};
        \node (os1)[process, below of =ao, xshift=1.7cm]{OS Est};
        \node (os2)[process, below of =os1, xshift=0cm]{OS Fin}; 
\node (acpc)[process, below of =ao, yshift=-4cm]{AC P\&C};
        \node (pc)[process, below of =acpc, xshift=1.7cm]{P\&C};
\node (adm)[process, below of =acpc, yshift=-2cm]{Adm\\(Service pers)};
%-------------------------------------------------------------------
\node (store)[process, below of =so, xshift=1.7cm]{Stores};
\node (mt)[process, below of =store, xshift=0cm]{MT};
%--------------------------------------------------------





\draw (cont)--(-23,0)|-(sqach);
\draw (cont)--(-23,0)|-(sqame);
%-------------------
\draw (cont)--(-19,0)|-(vigo);
\draw (cont)--(-19,0)|-(rtio);
\draw (cont)--(-19,0)|-(cyso);
\draw (cont)--(-19,0)|-(grio);
\draw (cont)--(-19,0)|-(sect);
\draw (cont)--(-19,0)|-(hino);
%-------------------
\draw (cont)--(-15,0)|-(jcsa);
\draw (jcsa)|-(dcsa);
\draw (dcsa)|-(rdcsa);
%-------------------------------------
\draw (cont)--(-9,0)|-(jco);
\draw (jco)|-(dco);
        \draw (dco)|-(so);
                \draw (so)|-(store);
                \draw (so)|-(mt);
        \draw (dco)|-(ao);
                \draw (ao)|-(os1);
                \draw (ao)|-(os2);
        \draw (dco)|-(acpc);
                \draw (acpc)|-(pc);
        \draw (dco)|-(adm);

\end{landscape}

I have completed the org chart as below

enter image description here

the code

\documentclass[10pt,a4paper]{article}
\usepackage{printlen}
\usepackage{titlesec}
\usepackage{multirow, makecell, tabularx, booktabs}
\usepackage{babel}
\usepackage{setspace}
\usepackage{framed}
\usepackage{fancybox}
\usepackage[short, nodayofweek, level, 12hr]{datetime}
\usepackage{paralist}
\usepackage{xcolor} 
\usepackage{xcoffins}
\usepackage{tocloft}
\usepackage{tgschola}%------------font YES
\usepackage{enumitem}
\usepackage{booktabs}                        %for toprule midrule bottomrule in tables
\usepackage{multirow} % Required for multirows
\usepackage{longtable}
\usepackage{rotating}
\usepackage{lscape}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage[none]{hyphenat}                             %no hyphenation
\usepackage{graphicx}
\usepackage{float}
\usepackage{lastpage}                                     %toget last page number
\usepackage{indentfirst}
\usepackage{smartdiagram}
\usepackage{wrapfig}

%header and footer
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}

\usepackage{fourier-orns}

\renewcommand\headrule{%------------fancy top line of page
\vspace{-6pt}
\hrulefill
\raisebox{-2.1pt}
{\quad\decofourleft\decotwo\decofourright\quad}%
\hrulefill}
\renewcommand\footrule{%------------fancy bottom line of page
\vspace{-6pt}
\hrulefill
\raisebox{-2.1pt}
{\quad\decofourleft\decotwo\decofourright\quad}%
\hrulefill}


%-----------------------------------------
\begin{document}
\begin{landscape}
\begin{tikzpicture}[node distance=2cm, transform canvas={scale=0.6}, xshift=420]

\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=2.5cm, draw=black, fill=blue!20]

\tikzstyle{arrow} = [thick,  ->, >=stealth]

\node (cont)[process]{CONTROLLER};
%------------
\node (sqach)[process, below of =cont, xshift=-14cm]{SQAO, Chennai};
\node (sqame)[process, below of =sqach]{SQAO, Medak};
%--------------------------
\node (vigo)[process, below of =cont, xshift=-10cm, yshift=-9cm]{Vigilance Offr};
\node (cyso)[process, below of =vigo]{Cyber Security Offr};
\node (rtio)[process, below of =cyso]{RTI Offr};
\node (grio)[process, below of =rtio]{Grievance Offr};
\node (sect)[process, below of =grio]{Secretariat};
\node (hino)[process, below of =sect]{Hindi Offr};
%----------------------------------------
\node (jct)[process, below of =cont, xshift=6cm]{Jt Controller\\T Wing};
\node (jcm)[process, below of =cont, xshift=14cm, yshift=0cm]{Jt Controller \\M Wing};
\node (jco)[process, below of =cont, xshift=-2cm, yshift=0cm]{Jt Controller \\O Wing};
\node (jcsa)[process, below of =cont, xshift=-8cm, yshift=0cm]{Jt Controller \\SA Wing};
%--------------------------------------------

\node (dcsa)[process, below of =jcsa, xshift=1.7cm]{Dy Controller};
\node (rdcsa)[process, below of =dcsa, xshift=1.7cm]{QMS\\URC};
%--------------------------
\node (dco)[process, below of =jco, xshift=1.7cm]{Dy Controller};
\node (so)[process, below of =dco, xshift=1.7cm]{Store Offr};
\node (ao)[process, below of =so, yshift=-4cm]{Adm offr};
        \node (os1)[process, below of =ao, xshift=1.7cm]{OS Est};
        \node (os2)[process, below of =os1, xshift=0cm]{OS Fin}; 
\node (acpc)[process, below of =ao, yshift=-4cm]{AC P\&C};
        \node (pc)[process, below of =acpc, xshift=1.7cm]{P\&C};
\node (adm)[process, below of =acpc, yshift=-2cm]{Adm\\(Service pers)};
%-------------------------------------------------------------------
\node (store)[process, below of =so, xshift=1.7cm]{Stores};
\node (mt)[process, below of =store, xshift=0cm]{MT};
%--------------------------------------------------------
\node (dcqa1)[process, below of =jct, xshift=1.7cm]{DCQA\\T-72};
        \node (acqa1)[process, below of =dcqa1, xshift=1.7cm]{ACQA\\T-72};
                  \node (racqa1)[process, below of =acqa1, xshift=1.7cm]{AHSP\\T-72};
                  \node (racqa2)[process, below of =racqa1, xshift=0cm]{OH\\T-72\\BLT};
%-------------------------------------------------------------------
\node (dcqa2)[process, below of =dcqa1, xshift=0cm, yshift=-6cm]{DCQA\\T-90};
        \node (acqa2)[process, below of =dcqa2, xshift=1.7cm]{ACQA\\QMS};
                \node (racqa3)[process, below of =acqa2, xshift=1.7cm]{QMS\\(Quality\\Audit)};
        \node (acqa3)[process, below of =acqa2, xshift=0cm, yshift=-2cm]{ACQA\\T-90};
                \node (racqa4)[process, below of =acqa3, xshift=1.7cm, yshift=-0cm]{AHSP\\T-90};
                \node (racqa5)[process, below of =racqa4, xshift=0cm, yshift=0cm]{GA\\TRAWL\\(T-72)\\Simulators};
%-------------------------------------------------------------------------------
\node (dcqam1)[process, below of =jcm, xshift=1.7cm]{DCQA\\AHSP\\QA/OH};
        \node (acqam1)[process, below of =dcqam1, xshift=1.7cm]{ACQA\\AHSP\\QA/OH}; 
                \node (racqam1)[process, below of =acqam1, xshift=1.7cm]{MBT\\T-55};
                \node (racqam2)[process, below of =racqam1, xshift=0cm]{MBT\\QA/ OH};
                \node (racqam3)[process, below of =racqam2, xshift=0cm]{BMP};   
\node (dcqam2)[process, below of =dcqam1, xshift=0cm, yshift=-8cm]{DCQA\\Doc\\Tracked vehicles};
        \node (acqam2)[process, below of =dcqam2, xshift=1.7cm]{ACQA\\Doc\\Tracked vehicles};   
                \node (racqam4)[process, below of =acqam2, xshift=1.7cm]{COD};      
                \node (racqam5)[process, below of =racqam4, xshift=0cm]{DRG};
                \node (racqam6)[process, below of =racqam5, xshift=0cm]{R\&R};  

%-------------------------------------------------------------------------------------
\draw (cont)--(-16,0)|-(sqach);
\draw (cont)--(-16,0)|-(sqame);
%-------------------
\draw (cont)--(-12,0)|-(vigo);
\draw (cont)--(-12,0)|-(rtio);
\draw (cont)--(-12,0)|-(cyso);
\draw (cont)--(-12,0)|-(grio);
\draw (cont)--(-12,0)|-(sect);
\draw (cont)--(-12,0)|-(hino);
%-------------------
\draw (cont)--(-11,0)|-(jcsa);
\draw (jcsa)|-(dcsa);
\draw (dcsa)|-(rdcsa);
%-------------------------------------
\draw (cont)--(-5,0)|-(jco);
\draw (jco)|-(dco);
        \draw (dco)|-(so);
                \draw (so)|-(store);
                \draw (so)|-(mt);
        \draw (dco)|-(ao);
                \draw (ao)|-(os1);
                \draw (ao)|-(os2);
        \draw (dco)|-(acpc);
                \draw (acpc)|-(pc);
        \draw (dco)|-(adm);
%---------------------------------------
\draw (cont)-|(jct);
        \draw (jct)|-(dcqa1);
            \draw (dcqa1)|-(acqa1);
                \draw (acqa1)|-(racqa1);
                \draw (acqa1)|-(racqa2);
        \draw (jct)|-(dcqa2);
                \draw (dcqa2)|-(acqa2);
                    \draw (acqa2)|-(racqa3);
                \draw (dcqa2)|-(acqa3);
                    \draw (acqa3)|-(racqa4);
                    \draw (acqa3)|-(racqa5);

%----------------------------------------
\draw (cont)--(19,0)|-(jcm);
        \draw (jcm)|-(dcqam1);
        \draw (jcm)|-(dcqam2);
            \draw (dcqam1)|-(acqam1);
            \draw (dcqam2)|-(acqam2);
                \draw (acqam1)|-(racqam1);
                \draw (acqam1)|-(racqam2);
                \draw (acqam1)|-(racqam3);
                \draw (acqam2)|-(racqam4);
                \draw (acqam2)|-(racqam5);
                \draw (acqam2)|-(racqam6);  

\end{tikzpicture}
\end{landscape}
\cleardoublepage
\end{document}

the balance is to get the line coming out of the CONTROLLER node from the bottom and not from the left or right side

also if any other improvements can be suggested

11
  • 1
    Use xshift as you were doing for other nodes. – nidhin Oct 27 '19 at 15:13
  • You could also use \node (jct)[process, below = 6 cm of cont,]{Jt Controller\\T Wing}. Apart from that, please make your example code compilable. Currently, there will be an error message about a missing node pro1. – leandriis Oct 27 '19 at 15:16
  • your MWE doesn't work. Please shorten it to small but complete document, which has loaded only to your problem relevant packages. Also clean up loaded tikz libraries. It is sufficient to load each only once. – Zarko Oct 27 '19 at 15:52
  • 1
    Please rather ask new question than changed this one. With edition you nullify all efforts of peoples who tried to help you. – Zarko Oct 28 '19 at 5:34
  • 4
    I’m voting to close this question because it is a just-do-it-for-me type of question (as Zarko also said, once he attempted to answer the question) – Alessandro Cuttin Apr 14 '20 at 22:09
1

Like this?

enter image description here

With use of the `forest package is simply to draw:

\documentclass[10pt,margin=3mm]{standalone}
\usepackage[edges]{forest}
\usetikzlibrary{arrows, arrows.meta,
                calc,
                decorations.markings,
                fit,
                matrix,
                positioning,
                quotes}

\begin{document}
    \begin{forest}
for tree = {draw,
            fill=blue!20,
            text width=24mm, minimum height=1cm,
            text centered,
    parent anchor = south,
     child anchor = north,
             grow = south,
            l sep = 7mm,
            s sep = 5mm,
         fork sep = 3mm,    % distance from parent to branching point
             edge = {draw, semithick, -stealth},
             forked edge,            
            }
[CONTROLLER
    [{SQAO,\\ Chennai}
        [Vigilance\\ Offr
            [Cyber\\ Security
                [RTI\\ Offr]
            ]
        ]
    ]
    [Jt Controller\\T Wing]
    [{SQAO,\\ Medak}
        [Grievance\\ Offr
            [Secretariat
                [Hindi\\ Offr]
            ]
        ]
    ]
]
\end{forest}
\end{document}
4
  • thanks-- please see the figure above – js bibra Oct 27 '19 at 16:34
  • Which figure? I saw below your MWE a figure which seems to me not be related to your question. I solve your problem with your MWE. My MWE reproduce your first image on consistent, simple and concise way. – Zarko Oct 27 '19 at 17:21
  • its the picture i have uploaded please – js bibra Oct 27 '19 at 17:23
  • 1
    No, this is request "do-it-instead-of-me". I will suggest to cloae question as to broad. – Zarko Oct 27 '19 at 17:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.