答案1
这是一个非常不灵活的解决方案,使用 TikZchains
库和weird
放置规则,需要您事先测量节点的高度Niveau
。 (这意味着实际节点需要包含该文本,并且不更改其inner ysep
。)
代码
\documentclass[tikz]{standalone}
\usetikzlibrary{arrows.meta, chains}
\usepackage{libertine}
\begin{document}
\begin{tikzpicture}[
>=Triangle, outer sep=auto, start chain=going weird,
weird/.style args={of #1}{
at=(#1.north), shift=(45:\Niveau), anchor=south},
every on chain/.style={
rectangle, rotate=-45, minimum width=3cm, minimum height=2cm},
Niveau node/.style={fill=magenta, text =white, minimum width=3cm},
Niveau/.style={
path only,
to path={-- node[Niveau node, rotate=-45](niv-#1){Niveau #1} (\tikztotarget)}},
]
\sffamily
\begin{scope}
\clip[overlay] (0,0) rectangle (50,50);
\pgfmathsetlengthmacro\Niveau{height("Niveau 0")+2*\pgfkeysvalueof{/pgf/inner ysep}}
\foreach[
count=\i from 0,
evaluate={
\tc=\i>2?"white":".";
\fc=int(100*\i/5+15);
},
] \t in {Exclusion, Inclusion, Apprenant, Contributeur, Challenger}
\node at (1,1) [on chain, fill/.expanded=purple!50!blue!\fc!pink,
label={[text=\tc]center:\bfseries\t}, join=by {Niveau=\i}] {};
\end{scope}
\draw[node font=\scshape, <->,very thick] (0,10)
|- node[near start, rotate=90, above] {Respect}
node[near end, below] {Permission} (12,0);
\foreach \niv/\t in {1/Seuil d'inclusion, 4/Seuil d'innovation}
\path[color={rgb,255:red,70;green,140;blue,180}]
node[draw, fill, circle, inner sep=+0pt, minimum size=+1ex]at(niv-\niv.east){}
edge[thick] node[at end, mid right]{\t} (\tikzlastnode -| 9,0);
\end{tikzpicture}
\end{document}