4

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

smartdiagram life cycle

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

\tikzset{every shadow/.style={fill=none,shadow scale=0}}                                                 
\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,
    additions={
        additional item font=\normalsize,
        additional item fill color=lightgray!50,
        additional item offset=1.20cm,
        additional item text width=2.2cm,
        additional item width=5cm
        }
    }
}

\smartdiagramset{custom}
\smartdiagramadd[circular diagram:clockwise]
    {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}
4
  • Hi, welcomme. What do you mean by highlighting an item in the diagram?
    – AndréC
    Aug 5, 2019 at 16:16
  • Hey, thx! Something like drawing a border around 2 side-by-side items in the picture. Aug 5, 2019 at 16:18
  • I added a very basic example for the highlighting in the picture. Aug 5, 2019 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 ;-) ) Aug 6, 2019 at 15:08

2 Answers 2

4

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}
\usesmartdiagramlibrary{additions}
\usetikzlibrary{fit,shapes.geometric,bending}
\newcounter{sdpic}
\begin{document} 

\tikzset{every shadow/.style={fill=none,shadow scale=0}}                                                 
\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,
    additions={
        additional item font=\normalsize,
        additional item fill color=lightgray!50,
        additional item offset=1.20cm,
        additional item text width=2.2cm,
        additional item width=5cm
        }
    }
}
\smartdiagramset{custom}
\smartdiagramadd[circular diagram:clockwise]
    {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}

enter image description here

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}
\usesmartdiagramlibrary{additions}
\begin{document} 

\tikzset{every shadow/.style={fill=none,shadow scale=0}}                                                 
\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,
    additions={
        additional item font=\normalsize,
        additional item fill color=lightgray!50,
        additional item offset=1.20cm,
        additional item text width=2.2cm,
        additional item width=5cm
        }
    }
}

\smartdiagramset{custom}
\smartdiagramadd[circular diagram:clockwise]
    {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}

enter image description here

3
  • 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? Aug 6, 2019 at 11:41
  • 1
    @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, 2019 at 12:44
  • 1
    Nice, I also learned a lot of things, thank you very much! ;) Aug 6, 2019 at 14:00
0

The wheelchart package, which I wrote, can be used.

The colors are given as a list with the key slices style{list}.

The text contains some /. Initially, the / is used to separate the data. Hence we use the key separator columns=; to change this separator symbol to a ;.

The circles for the shape of the slices are obtained with the key slices.

We set value=1 so that each slice is the same size. We also set the key data empty.

The arrows are obtained with a second \wheelchart and the key slices end arrow.

enter image description here

\documentclass[border=6pt]{standalone}
\usepackage{wheelchart}
\begin{document}
\begin{tikzpicture}
\draw[fill=blue!20,shift={(112.5:{4.5*cos(22.5)})},rotate=22.5] (0,0) ellipse[x radius=3.5,y radius=2];
\pgfkeys{
  /wheelchart,
  slices style{list}={red!40,cyan!40,blue!40,green!40,orange!40,yellow!40,magenta!40,brown!40,violet!40,teal!40}%colors as defined by the smartdiagram package
}
\wheelchart[
  data=,
  middle=Linked\\Data Life\\Cycle,
  middle fill=lightgray!50,
  radius={2}{7},
  separator columns=;,
  slices={(0,0) circle[radius=1.2];},
  start half=135,
  value=1,
  wheel data=\WCvarA,
  wheel data pos=0.5,
  wheel data style={align=center}
]{%
  Interlinking\\/ Fusing,
  Classifi-\\cation /\\Enrichment,
  Quality\\Analysis,
  Evolution\\/ Repair,
  Search /\\Browsing /\\Exploration,
  Extraction,
  Storage /\\Querying,
  Manual\\revision /\\authoring%
}
\wheelchart[
  explode=4,
  radius={1}{1.2},
  slices end arrow={1.5}{-1},
  start angle=182,
  total count=8
]{}
\end{tikzpicture}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .