如何在 chronosys 时间轴中获取圆角矩形文本框并添加连接器?

如何在 chronosys 时间轴中获取圆角矩形文本框并添加连接器?

我正在尝试修改chronosys这里获得圆角矩形连接器这样文本框和范围就通过它们的中点连接起来了,如下面的示例图所示。

平均能量损失Luc M 的回答

\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{chronosys}
\usepackage[paperwidth=34cm, paperheight=10cm]{geometry}%taille du document

\definecolor{blue}{HTML}{84CECC}
\definecolor{gr}{HTML}{375D81}
%
%
%
\begin{document}
%---------------------timeline----------------%
\startchronology[align=left, startyear=1999,stopyear=2013, height=0pt, startdate=false, stopdate=false, dateselevation=0pt, arrow=false, box=true]
%
\chronograduation[event][dateselevation=0pt]{1}
%---------------------periods----------------%
\chronoperiode[textstyle=\raggedleft\colorbox{gr!50}, color=gr, startdate=false, bottomdepth=0pt, topheight=8pt, textdepth=-25pt,dateselevation=16pt, stopdate=false]{2005}{2009}{University of Tennessee Chattanooga}
%
\chronoperiode[textstyle=\colorbox{blue!50}, color=blue, startdate=false, bottomdepth=8pt, topheight=16pt, textdepth=-25pt, dateselevation=12pt, stopdate=false]{2000}{2004}{Tennesse Technological University}
%
\stopchronology
\end{document}

期望输出

在此处输入图片描述

答案1

我不知道如何实现这一点chronosys,但使用普通的 Ti 很容易Z. 为了您的方便,我添加了一个以年份(分数)形式显示日期的坐标系统。

\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows.meta}
\tikzdeclarecoordinatesystem{timeline}{% #1 is the date in years
    \pgfmathsetmacro\myx{(#1-1975)/3}
    \pgfpointxy{\myx}{0}
}
\begin{document}
\begin{tikzpicture}[line cap=rect,event/.style={fill,font=\tiny,text=white,inner
sep=0.4ex,text height=1ex,text depth=0.4ex,rounded corners},bullet/.style={circle,fill,node contents={},inner sep=1pt}]
\draw (timeline cs:1975) -- (timeline cs:2020);
\foreach \X in {1975,1980,...,2020}
{\draw (timeline cs:\X) -- ++(0,0.2) node[above,font=\tiny]{\X};}
\draw[blue!80] (timeline cs:1977) node[bullet] -- ++ (0,-0.8) node[below,event]{A New Hope};
\draw[orange] (timeline cs:1980.4) node[bullet] -- ++ (0,-1.6) node[below,event]{The Empire Strikes Back};
\draw[green!80!black] (timeline cs:1984) node[bullet] -- ++ (0,-0.8) node[below,event]{Return of the Jedi};
\draw[purple!80] (timeline cs:2002.5) node[bullet] -- ++ (0,-0.8) node[below,event] (Clone) {Attack of the Clones};
\node[red,left=0.3em of Clone,event] (Phantom) {The Phantom Menace};
\draw[red] (timeline cs:1999) node[bullet] to[out=-90,in=90] (Phantom);
\node[brown!80!black,right=0.3em of Clone,event] (Sith) {Revenge of the Sith};
\draw[brown!80!black] (timeline cs:2005.5) node[bullet] to[out=-90,in=90] (Sith);
\draw[pink!90!black] (timeline cs:2016) node[bullet] -- ++ (0.2,-0.8) node[below,event] {The Force Awakens};
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容