1

How to modify this timeline (as shown in the attached image):

  1. Have a dashed arrow coming out of the rectangular see (Timeline in LaTeX).
  2. Remove the left and right borders.
  3. Relocate the names of A123 and X256 to be inside the rectangle

enter image description here

        \documentclass[10pt]{article}
    \usepackage[utf8]{inputenc}
    \usepackage{chronosys}
    \usepackage[paperwidth=34cm, paperheight=10cm]{geometry}%taille du document
\definecolor{gry}{HTML}{375D81}
\definecolor{cyan}{HTML}{00ffff}


\begin{document}
    %---------------------timeline----------------%
    \startchronology[align=left, startyear=1993,stopyear=2037, height=0pt, startdate=false, stopdate=false, dateselevation=0pt, arrow=false, box=true]
    %
    \chronograduation[event][dateselevation=0pt]{1}
    %---------------------periods----------------%
    \chronoperiode[textstyle=\colorbox{gry!50}, color=gry, startdate=false, bottomdepth=0pt, topheight=15pt, textdepth=35pt,dateselevation=12pt, stopdate=false]{1994}{2020}{X256}

    \chronoperiode[textstyle=\colorbox{cyan!50}, color=cyan, startdate=false, bottomdepth=16pt, topheight=31pt, textdepth=-25pt, dateselevation=12pt, stopdate=false]{1998}{2019}{A123}


    \stopchronology
\end{document}


MS-SPO
  • 11,519
OOzy Pal
  • 1,571

1 Answers1

0

Here's a way to do it with plain-Tikz, as chronosys hides Tikz effectively. A few remarks:

  1. I switched to the standalone class to get rid of paper format problems.

  2. The styles defined are for bluebar, graybar, arrow tipp and arr-appearance.

  3. The bars are simply thick lines, where I remember the coordinates at the end BB, GB

  4. The time line is just a line, plus a loop to place the text. I assume a 1cm grid for simplicity.

  5. Recalling coordinates BB and GB the additional arrows are easy to draw, stretching 10 units (cm) to the right. Adjust dashes like shown in the pgfmanual.

  6. Labels are easy to place. As you can seem I cild have calculated the required cm by a simple difference, too.

  7. If you want to scale this picture later, don't forget to include transform shape in the options, see pgfmanual.

result

%\documentclass[10pt]{article}
\documentclass[10pt,border=3mm,tikz]{standalone}
%%%%\usepackage[utf8]{inputenc}
%\usepackage{chronosys}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
%\usepackage[paperwidth=34cm, paperheight=10cm]{geometry}%taille du document

\definecolor{gry}{HTML}{375D81} \definecolor{cyan}{HTML}{00ffff}

\begin{document} \begin{tikzpicture}[ bb/.style={line width=1cm, draw=cyan}, gb/.style={line width=1cm, draw=gry}, >={Latex}, arr/.style={->,dashed,red}, ] % ~~~ bars ~~~~~~~~~~ \draw[bb] (5,1.5) -- (25,1.5) coordinate (BB); \draw[gb] (1,0.5) -- (26,0.5) coordinate (GB);

% ~~~ time line ~~~~~~~~~~~
\draw (0,0) -- (44,0);
\foreach \yr [count=\i] in {1994,1995,...,2037}
    \draw (\i,0) -- +(0,-.8) node[fill=white] {\yr};

% ~~~ additional arrows ----
\draw[arr] (BB) -- +(10,0);
\draw[arr] (GB) -- +(10,0);

% ~~~ labels ~~~~~~~~~~~
\node             at (2006-1993,1.5) {A123};
\node[text=white] at (2004-1993,0.5) {X256};

\end{tikzpicture} \end{document}

MS-SPO
  • 11,519