I want to draw multiple sequence diagrams with smartdiagram in tikz and append some explanatory text.
Here is my minimum working example code:
\documentclass{article}
\usepackage[a4paper, landscape, margin=2in]{geometry}
\usepackage[rgb]{xcolor}
\usepackage{tikz}
\usepackage{smartdiagram}
\usesmartdiagramlibrary{additions}
\definecolorseries{colours}{hsb}{grad}[hsb]{.575,1,1}{.987,-.234,0}
\resetcolorseries[12]{colours}
\begin{document}
\centering
\smartdiagramset{
set color list={red!10, red!30,red!50},
sequence item border color=black,
sequence item text color=black,
sequence item border size=1.2\pgflinewidth,
sequence item font size=\scriptsize\sffamily,
additions={
additional item shape = rectangle,
additional item fill color = colours!!+!20,
additional item border color = colours!!,
additional arrow line width = 2pt,
additional arrow tip = to,
additional arrow color = black,
additional item font = \scriptsize\sffamily,
}
}
\smartdiagramadd[sequence diagram]{A1, B1, C1, D1, E1, F1, G1, H1}
{
above of sequence-item1/Step 1,
above of sequence-item2/Step 2,
above of sequence-item3/Step 3,
above of sequence-item4/Step 4,
above of sequence-item5/Step 5,
above of sequence-item6/Step 6,
above of sequence-item7/Step 7,
above of sequence-item8/Step 8
}
\smartdiagramconnect{to-}{sequence-item1/additional-module1}
\smartdiagramconnect{to-}{sequence-item2/additional-module2}
\smartdiagramconnect{to-}{sequence-item3/additional-module3}
\smartdiagramconnect{to-}{sequence-item4/additional-module4}
\smartdiagramconnect{to-}{sequence-item5/additional-module5}
\smartdiagramconnect{to-}{sequence-item6/additional-module6}
\smartdiagramconnect{to-}{sequence-item7/additional-module7}
\smartdiagramconnect{to-}{sequence-item8/additional-module8}
\smartdiagram[sequence diagram]{A2, B2, C2, D2, E2, F2, G2, H2}
\smartdiagram[sequence diagram]{A3, B3, C3, D3, E3, F3, G3, H3}
\begin{tikzpicture}[overlay]
\node[left = of module1, xshift = -90mm, yshift = 45mm] {C 1};
\node[left = of module1, xshift = -90mm, yshift = 27mm] {C 2};
\node[left = of module1, xshift = -90mm, yshift = 12mm] {C 3};
\end{tikzpicture}
\end{document}
Questions
- Space between first & second sequence diagrams and space between second & third sequence diagrams are not same.
- Increase the distance between first sequence diagram and explanatory text in boxes above it.
- Put text like C 1, C 2 and C 3 in boxes.
- How to change color of a single and multiple items for a specific sequence diagram only.
set color list
, if you want to change the colour of one or more of the items, change them there.