# Highlight (some) items in smart diagram (circular diagram)

I already created the a basic smart diagram. Now I want to highlight 2 of the items in the smart diagram, but I am not able to find a solution.

I tried to create some background layer for surrounding 2 nodes as shown in http://www.texample.net/tikz/examples/nodetutorial/ , e.g., for the items Interlinking + Classification.

This is what I have right now:

edit: updated picture

\documentclass[12pt]{article}
\usepackage{smartdiagram}
\begin{document}

\tikzset{module/.append style={top color=\col,bottom color=\col}}
\begin{center}

\smartdiagramset{custom/.style={
arrow tip=latex,
arrow line width=2.5pt,
module shape=circle,
font=\footnotesize,
text width=2cm,
circular distance=5cm,
border color=none,
additional item fill color=lightgray!50,
additional item text width=2.2cm,
}
}
}

\smartdiagramset{custom}
{Interlinking / Fusing, Classification / Enrichment,
Quality Analysis, Evolution / Repair,
Search / Browsing / Exploration, Extraction,
Storage / Querying,
Manual revision / authoring}
{below of module2/Linked Data Life Cycle}
\end{center}
\end{document}

• Hi, welcomme. What do you mean by highlighting an item in the diagram? – AndréC Aug 5 '19 at 16:16
• Hey, thx! Something like drawing a border around 2 side-by-side items in the picture. – Markus Nentwig Aug 5 '19 at 16:18
• I added a very basic example for the highlighting in the picture. – Markus Nentwig Aug 5 '19 at 16:24
• If you want to have an easier to handle version of the Linked Data Life Cycle I think the smartdiagram package is not to convenient. Check out this tikz version: natanael.arndt.xyz/notes/lod-cycle (I should post it to texample.net/tikz as well ;-) ) – white_gecko Aug 6 '19 at 15:08

That's not too difficult. You can "hack" the package. See here for how you can automatize the rotation of the ellipse, and drop the background stuff if you want to draw the ellipse on the foreground. You may also use a rounded rectangle, say. The trick is to make every tikzpicture execute the desired commands in that group. The naming conventions for the nodes can be looked up in the smartdiagram manual, from which I inferred the names module1 and module2. Note that this smartdiagram involves two tikzpictures, and we only want to "hack" the first one, hence the counter sdpic. (The arrow heads look better if one loads bending.)

\documentclass[12pt]{article}
\usepackage{smartdiagram}
\usetikzlibrary{fit,shapes.geometric,bending}
\newcounter{sdpic}
\begin{document}

\tikzset{module/.append style={top color=\col,bottom color=\col}}
\begin{center}
\begingroup% <- not really needed within center
\setcounter{sdpic}{0}
\tikzset{every picture/.append style={execute at end picture={
\stepcounter{sdpic}
\ifnum\value{sdpic}<2
\begin{pgfonlayer}{background}
\node[fit=(module1)(module2),ellipse,draw,rotate=20,inner
sep=-3pt,thick,fill=blue!20]{};
\end{pgfonlayer}
\fi}
}}
\smartdiagramset{custom/.style={
arrow tip=latex,
arrow line width=2.5pt,
module shape=circle,
font=\footnotesize,
text width=2cm,
circular distance=5cm,
border color=none,
additional item fill color=lightgray!50,
additional item text width=2.2cm,
}
}
}
\smartdiagramset{custom}
{Interlinking / Fusing, Classification / Enrichment,
Quality Analysis, Evolution / Repair,
Search / Browsing / Exploration, Extraction,
Storage / Querying,
Manual revision / authoring}
{below of module2/Linked Data Life Cycle}
\endgroup%
\end{center}
\end{document}


OLD ANSWER: Here I add a blue halo to module 2 and a red halo to module 4, but you will find it easy to to highlight the nodes you want the way you want by changing the \ifnum and \tikzset statements accordingly.

\documentclass[12pt]{article}
\usepackage{smartdiagram}
\begin{document}

\tikzset{module/.append style={top color=\col,bottom color=\col,
/utils/exec={\ifnum\xi=2
\tikzset{draw=blue,thick}
\fi
\ifnum\xi=4
\tikzset{draw=red,thick}
\fi}}}
\begin{center}

\smartdiagramset{custom/.style={
arrow tip=latex,
arrow line width=2.5pt,
module shape=circle,
font=\footnotesize,
text width=2cm,
circular distance=5cm,
border color=none,
additional item fill color=lightgray!50,
additional item text width=2.2cm,
}
}
}

\smartdiagramset{custom}
{Interlinking / Fusing, Classification / Enrichment,
Quality Analysis, Evolution / Repair,
Search / Browsing / Exploration, Extraction,
Storage / Querying,
Manual revision / authoring}
{below of module2/Linked Data Life Cycle}
\end{center}

\end{document}


• Thank you very much! That's 95% of the solution and more than helping. One minor thing I wonder about: the ellipse not the last layer in the background, would it be possible to put the ellipse even more to the background "with some easy hack", e.g., to fill the ellipse with some color? – Markus Nentwig Aug 6 '19 at 11:41
• @MarkusNentwig You are welcome and the answer is yes. I updated the answer accordingly. It was slightly more tricky than I thought because there were two pictures involved. On the bright side this allowed me to learn something and to remove the background library. – user121799 Aug 6 '19 at 12:44
• Nice, I also learned a lot of things, thank you very much! ;) – Markus Nentwig Aug 6 '19 at 14:00