3

I was checking this question and this other one, and I was wondering if somebody has a solution to create concentric ring/donut charts

I want to accomplish something like this: example1

Or more in particular something like this: example2

Because I want to use it for languages and would like to be able to write "汉语" for Chinese...

Does anybody know of a proper way to do it? Many thanks!

7
  • 3
    Such representations are bad. They make the outer values look bigger than they are. E.g. in some of your examples the green ring looks larger than the yellow. Commented Dec 1, 2016 at 7:43
  • How about a concentric pie chart?
    – DaniCee
    Commented Dec 1, 2016 at 7:53
  • Google for "pie charts evil". Commented Dec 1, 2016 at 8:01
  • I don't know how a concentric pie chart will solve Ulrike's comment, but here you have an example.
    – Ignasi
    Commented Dec 1, 2016 at 8:05
  • 1
    Nice colors; but a reader will mentally unwind the bars, so thinking that Turkey (in the smallest version of the diagram) performs better than Iceland. Pie charts are not evil per se; they surely become bad when “three dimensional”.
    – egreg
    Commented Dec 1, 2016 at 8:19

2 Answers 2

4

Disregarding the recommendations to not use this kind of diagram, it's fairly straightforward to draw those kinds of things, just a matter of drawing some arcs. I didn't try matching the colors, or making any sort of nice interface.

enter image description here

\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\foreach [count=\i] \total/\clr in {80/blue,60/red,45/green,25/cyan}
   \draw [line width=2mm,\clr]
     (0.5cm+\i*3mm,0)
     node[above,inner sep=0pt,black,font=\scriptsize]{\total}
     arc[start angle=0,radius=0.5cm+\i*3mm,delta angle=-3.60*\total];
\matrix [every node/.style={right=1.5mm,black,font=\small}] at (2,2) {
   \fill[blue] circle[radius=2mm] node  {Iceland}; \\
   \fill[red] circle[radius=2mm] node  {Switzerland}; \\
   \fill[green] circle[radius=2mm] node  {USA}; \\
   \fill[cyan] circle[radius=2mm] node  {Turkey}; \\
};
\end{tikzpicture}

\begin{tikzpicture}
\foreach [count=\i] \total/\clr in {10/cyan,20/green,30/red,50/blue}
   \draw [line width=2mm,\clr]
     (-0.5cm-\i*2.5mm,0)
%     node[above,inner sep=0pt,black,font=\scriptsize]{\total}
     arc[start angle=180,radius=0.5cm+\i*2.5mm,delta angle=3.60*\total];

\begin{scope}[every node/.style={above,anchor=south west,inner sep=0.5pt,xshift=-2mm,font=\scriptsize}]
\node [cyan] (I) at (0,0.2) {Italian};
\node [green] (F) at (I.north west) {French};
\node [red] (E) at (F.north west) {English};
\node [blue] (H) at (E.north west) {Hungarian};
\end{scope}
\end{tikzpicture}
\end{document}
3

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

Each ring is placed in a separate \wheelchart.

The value (used in the key total angle) and the color (used in the key slices style) are defined in the \foreach loop. The counter \n of this loop is used in the key radius which sets the inner radius to 1+\n and the outer radius to 2+\n. Hereafter, these radii are modified with the key gap radius to create the gap between the rings.

enter image description here

\documentclass[border=6pt,dvipsnames]{standalone}
\usepackage{wheelchart}
\begin{document}
\begin{tikzpicture}
\foreach\WCvalue/\WCcolor [count=\n] in {80/Yellow,60/Green,40/Blue,25/Red}{
\wheelchart[
  data=,
  gap radius=0.1,
  radius={1+\n}{2+\n},
  slices style=\WCcolor,
  start angle=0,
  total angle={\WCvalue*3.6}
]{1}
\node[above] at ({1.5+\n},0) {$\WCvalue$};
}
\end{tikzpicture}
\end{document}
3
  • 1
    wheelchart looks great (are you the author?), but could you slow down a little so new questions don't get immediately bumped from the front page?
    – cfr
    Commented Dec 5, 2023 at 7:09
  • 2
    Thank you. I will post some more answers but at a lower speed. Commented Dec 5, 2023 at 7:42
  • Sounds great - thanks!
    – cfr
    Commented Dec 5, 2023 at 17:43

You must log in to answer this question.

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