Help Modifying Sunburst Chart Code for Genealogy Purposes
I took code previously posted here: Is there a way to make "sunburst charts" (multi-level pie charts) in LaTeX?
And I wanted to modify this for genealogy purposes. I have the setup I would like, but I am not sure how to modify the function such that I can have two lines of text for each arctext piece.
Can anyone help me to understand the function such that I can modify it for displaying two lines?
I think the "height" of the boxes is already coded and I can play with the function to adjust it for the size text accordingly.
Thanks.
documentclass[border=5pt]{standalone}
usepackage{xcolor}
definecolor{orange1}{HTML}{F1753A}
definecolor{orange2}{HTML}{F7A13E}
definecolor{orange3}{HTML}{FC6300}
definecolor{root}{HTML}{B2B2B2}
usepackage{tikz}
usepackage{pgfmath}
usetikzlibrary{decorations.text, arrows.meta,calc,shadows.blur,shadings}
renewcommand*familydefault{sfdefault} % Set font to serif family
% arctext from Andrew code with modifications:
%Variables: 1: ID, 2:Style 3:box height 4: Radious 5:start-angl 6:end-angl 7:text {format along path}
defarctext[#1][#2][#3](#4)(#5)(#6)#7{
draw[
color=white,
thick,
line width=1.3pt,
fill=#2
]
(#5:#4cm+#3) coordinate (above #1) arc (#5:#6:#4cm+#3)
-- (#6:#4) coordinate (right #1) -- (#6:#4cm-#3) coordinate (below right #1)
arc (#6:#5:#4cm-#3) coordinate (below #1)
-- (#5:#4) coordinate (left #1) -- cycle;
defa#1{#4cm+#3}
defb#1{#4cm-#3}
path[
decoration={
raise = -0.5ex, % Controls relavite text height position.
text along path,
text = {#7},
text align = center,
},
decorate
]
(#5:#4) arc (#5:#6:#4);
}
%arcarrow, this is mine, for beerware purpose...
%Function: Draw an arrow from arctex coordinate specific nodes to another
%Arrow start at the start of arctext box and could be shifted to change the position
%to avoid go over another box.
%Var: 1:Start coordinate 2:End coordinate 3:angle to shift from acrtext box
defarcarrow[#1](#2)(#3)[#4]{
draw[thick,-,>=latex,color=#1,line width=1pt,shorten >=-2pt, shorten <=-2pt]
let p1 = (#2), p2 = (#3), % To access cartesian coordinates x, and y.
n1 = {veclen(x1,y1)}, % Distance from the origin
n2 = {veclen(x2,y2)}, % Distance from the origin
n3 = {atan2(y1,x1)} % Angle where acrtext starts.
in (n3-#4: n1) -- (n3-#4: n2); % Draw the arrow.
}
begin{document}
begin{tikzpicture}[
% Environment Cfg
font=sf scriptsize,
% Styles
myarrow/.style={
thick,
-latex,
},
Center/.style ={
circle,
fill=white,
text=root,
align=center,
font =footnotesize,
inner sep=1pt,
},
]
% Drawing the center
node[Center](ROOT) at (0,0) {Test \ Boy};
% Drawing the Tex Arcs
% Arctext[ID][box-style][box-height](radious)(start-angl)(end-angl){|text-styles| Text}
% Node 1: Father
arctext[N1][orange1][15pt](1.5)(180)(0){|footnotesizebfcolor{white}| John Boy B. 12 Jun 2016};
%Sub 1: Grandfather
arctext[N1S1][orange1][13pt](2.5)(180)(90){|footnotesizebfcolor{white}| Sub1};
%Sub 1-Sub 1: Great Grandfather
arctext[N1S1S1][orange1][8pt](3.25)(180)(135){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S1S1S1][orange1][8pt](3.8)(180)(157.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S1S1S2][orange1][8pt](3.8)(157.5)(135){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2: Great Grandmother
arctext[N1S1S2][orange1][8pt](3.25)(135)(90){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S1S2S1][orange1][8pt](3.8)(135)(112.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S1S2S2][orange1][8pt](3.8)(112.5)(90){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2: Grandmother
arctext[N1S2][orange1][13pt](2.5)(90)(0){|footnotesizebfcolor{white}| Sub2};
%Sub 2-Sub 1: Great Grandfather
arctext[N1S2S1][orange1][8pt](3.25)(90)(45){|footnotesizebfcolor{white}| Sub2-Sub1};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S2S1S1][orange1][8pt](3.8)(90)(67.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S2S1S2][orange1][8pt](3.8)(67.5)(45){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2-Sub 2: Great Grandmother
arctext[N1S2S2][orange1][8pt](3.25)(45)(0){|footnotesizebfcolor{white}| Sub2-Sub2};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S2S2S1][orange1][8pt](3.8)(45)(22.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S2S2S2][orange1][8pt](3.8)(22.5)(0){|footnotesizebfcolor{white}| Sub1-Sub2}
arctext[N2][orange2][15pt](1.5)(180)(360){|footnotesizebfcolor{white}| John Boy B. 12 Jun 2016};
%Sub 1: Grandfather
arctext[N2S1][orange2][13pt](2.5)(180)(270){|footnotesizebfcolor{white}| Sub1};
%Sub 1-Sub 1: Great Grandfather
arctext[N2S1S1][orange2][8pt](3.25)(180)(225){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S1S1S1][orange2][8pt](3.8)(180)(202.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S1S1S2][orange2][8pt](3.8)(202.5)(225){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2: Great Grandmother
arctext[N2S1S2][orange2][8pt](3.25)(225)(270){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S1S2S1][orange2][8pt](3.8)(225)(247.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S1S2S2][orange2][8pt](3.8)(247.5)(270){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2: Grandmother
arctext[N2S2][orange2][13pt](2.5)(270)(360){|footnotesizebfcolor{white}| Sub2};
%Sub 2-Sub 1: Great Grandfather
arctext[N2S2S1][orange2][8pt](3.25)(270)(315){|footnotesizebfcolor{white}| Sub2-Sub1};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S2S1S1][orange2][8pt](3.8)(270)(292.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S2S1S2][orange2][8pt](3.8)(292.5)(315){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2-Sub 2: Great Grandmother
arctext[N2S2S2][orange2][8pt](3.25)(315)(360){|footnotesizebfcolor{white}| Sub2-Sub2};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S2S2S1][orange2][8pt](3.8)(315)(337.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S2S2S2][orange2][8pt](3.8)(337.5)(360){|footnotesizebfcolor{white}| Sub1-Sub2}
end{tikzpicture}
end{document}

tikz-pgf charts genealogy
add a comment |
I took code previously posted here: Is there a way to make "sunburst charts" (multi-level pie charts) in LaTeX?
And I wanted to modify this for genealogy purposes. I have the setup I would like, but I am not sure how to modify the function such that I can have two lines of text for each arctext piece.
Can anyone help me to understand the function such that I can modify it for displaying two lines?
I think the "height" of the boxes is already coded and I can play with the function to adjust it for the size text accordingly.
Thanks.
documentclass[border=5pt]{standalone}
usepackage{xcolor}
definecolor{orange1}{HTML}{F1753A}
definecolor{orange2}{HTML}{F7A13E}
definecolor{orange3}{HTML}{FC6300}
definecolor{root}{HTML}{B2B2B2}
usepackage{tikz}
usepackage{pgfmath}
usetikzlibrary{decorations.text, arrows.meta,calc,shadows.blur,shadings}
renewcommand*familydefault{sfdefault} % Set font to serif family
% arctext from Andrew code with modifications:
%Variables: 1: ID, 2:Style 3:box height 4: Radious 5:start-angl 6:end-angl 7:text {format along path}
defarctext[#1][#2][#3](#4)(#5)(#6)#7{
draw[
color=white,
thick,
line width=1.3pt,
fill=#2
]
(#5:#4cm+#3) coordinate (above #1) arc (#5:#6:#4cm+#3)
-- (#6:#4) coordinate (right #1) -- (#6:#4cm-#3) coordinate (below right #1)
arc (#6:#5:#4cm-#3) coordinate (below #1)
-- (#5:#4) coordinate (left #1) -- cycle;
defa#1{#4cm+#3}
defb#1{#4cm-#3}
path[
decoration={
raise = -0.5ex, % Controls relavite text height position.
text along path,
text = {#7},
text align = center,
},
decorate
]
(#5:#4) arc (#5:#6:#4);
}
%arcarrow, this is mine, for beerware purpose...
%Function: Draw an arrow from arctex coordinate specific nodes to another
%Arrow start at the start of arctext box and could be shifted to change the position
%to avoid go over another box.
%Var: 1:Start coordinate 2:End coordinate 3:angle to shift from acrtext box
defarcarrow[#1](#2)(#3)[#4]{
draw[thick,-,>=latex,color=#1,line width=1pt,shorten >=-2pt, shorten <=-2pt]
let p1 = (#2), p2 = (#3), % To access cartesian coordinates x, and y.
n1 = {veclen(x1,y1)}, % Distance from the origin
n2 = {veclen(x2,y2)}, % Distance from the origin
n3 = {atan2(y1,x1)} % Angle where acrtext starts.
in (n3-#4: n1) -- (n3-#4: n2); % Draw the arrow.
}
begin{document}
begin{tikzpicture}[
% Environment Cfg
font=sf scriptsize,
% Styles
myarrow/.style={
thick,
-latex,
},
Center/.style ={
circle,
fill=white,
text=root,
align=center,
font =footnotesize,
inner sep=1pt,
},
]
% Drawing the center
node[Center](ROOT) at (0,0) {Test \ Boy};
% Drawing the Tex Arcs
% Arctext[ID][box-style][box-height](radious)(start-angl)(end-angl){|text-styles| Text}
% Node 1: Father
arctext[N1][orange1][15pt](1.5)(180)(0){|footnotesizebfcolor{white}| John Boy B. 12 Jun 2016};
%Sub 1: Grandfather
arctext[N1S1][orange1][13pt](2.5)(180)(90){|footnotesizebfcolor{white}| Sub1};
%Sub 1-Sub 1: Great Grandfather
arctext[N1S1S1][orange1][8pt](3.25)(180)(135){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S1S1S1][orange1][8pt](3.8)(180)(157.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S1S1S2][orange1][8pt](3.8)(157.5)(135){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2: Great Grandmother
arctext[N1S1S2][orange1][8pt](3.25)(135)(90){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S1S2S1][orange1][8pt](3.8)(135)(112.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S1S2S2][orange1][8pt](3.8)(112.5)(90){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2: Grandmother
arctext[N1S2][orange1][13pt](2.5)(90)(0){|footnotesizebfcolor{white}| Sub2};
%Sub 2-Sub 1: Great Grandfather
arctext[N1S2S1][orange1][8pt](3.25)(90)(45){|footnotesizebfcolor{white}| Sub2-Sub1};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S2S1S1][orange1][8pt](3.8)(90)(67.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S2S1S2][orange1][8pt](3.8)(67.5)(45){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2-Sub 2: Great Grandmother
arctext[N1S2S2][orange1][8pt](3.25)(45)(0){|footnotesizebfcolor{white}| Sub2-Sub2};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S2S2S1][orange1][8pt](3.8)(45)(22.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S2S2S2][orange1][8pt](3.8)(22.5)(0){|footnotesizebfcolor{white}| Sub1-Sub2}
arctext[N2][orange2][15pt](1.5)(180)(360){|footnotesizebfcolor{white}| John Boy B. 12 Jun 2016};
%Sub 1: Grandfather
arctext[N2S1][orange2][13pt](2.5)(180)(270){|footnotesizebfcolor{white}| Sub1};
%Sub 1-Sub 1: Great Grandfather
arctext[N2S1S1][orange2][8pt](3.25)(180)(225){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S1S1S1][orange2][8pt](3.8)(180)(202.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S1S1S2][orange2][8pt](3.8)(202.5)(225){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2: Great Grandmother
arctext[N2S1S2][orange2][8pt](3.25)(225)(270){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S1S2S1][orange2][8pt](3.8)(225)(247.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S1S2S2][orange2][8pt](3.8)(247.5)(270){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2: Grandmother
arctext[N2S2][orange2][13pt](2.5)(270)(360){|footnotesizebfcolor{white}| Sub2};
%Sub 2-Sub 1: Great Grandfather
arctext[N2S2S1][orange2][8pt](3.25)(270)(315){|footnotesizebfcolor{white}| Sub2-Sub1};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S2S1S1][orange2][8pt](3.8)(270)(292.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S2S1S2][orange2][8pt](3.8)(292.5)(315){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2-Sub 2: Great Grandmother
arctext[N2S2S2][orange2][8pt](3.25)(315)(360){|footnotesizebfcolor{white}| Sub2-Sub2};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S2S2S1][orange2][8pt](3.8)(315)(337.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S2S2S2][orange2][8pt](3.8)(337.5)(360){|footnotesizebfcolor{white}| Sub1-Sub2}
end{tikzpicture}
end{document}

tikz-pgf charts genealogy
add a comment |
I took code previously posted here: Is there a way to make "sunburst charts" (multi-level pie charts) in LaTeX?
And I wanted to modify this for genealogy purposes. I have the setup I would like, but I am not sure how to modify the function such that I can have two lines of text for each arctext piece.
Can anyone help me to understand the function such that I can modify it for displaying two lines?
I think the "height" of the boxes is already coded and I can play with the function to adjust it for the size text accordingly.
Thanks.
documentclass[border=5pt]{standalone}
usepackage{xcolor}
definecolor{orange1}{HTML}{F1753A}
definecolor{orange2}{HTML}{F7A13E}
definecolor{orange3}{HTML}{FC6300}
definecolor{root}{HTML}{B2B2B2}
usepackage{tikz}
usepackage{pgfmath}
usetikzlibrary{decorations.text, arrows.meta,calc,shadows.blur,shadings}
renewcommand*familydefault{sfdefault} % Set font to serif family
% arctext from Andrew code with modifications:
%Variables: 1: ID, 2:Style 3:box height 4: Radious 5:start-angl 6:end-angl 7:text {format along path}
defarctext[#1][#2][#3](#4)(#5)(#6)#7{
draw[
color=white,
thick,
line width=1.3pt,
fill=#2
]
(#5:#4cm+#3) coordinate (above #1) arc (#5:#6:#4cm+#3)
-- (#6:#4) coordinate (right #1) -- (#6:#4cm-#3) coordinate (below right #1)
arc (#6:#5:#4cm-#3) coordinate (below #1)
-- (#5:#4) coordinate (left #1) -- cycle;
defa#1{#4cm+#3}
defb#1{#4cm-#3}
path[
decoration={
raise = -0.5ex, % Controls relavite text height position.
text along path,
text = {#7},
text align = center,
},
decorate
]
(#5:#4) arc (#5:#6:#4);
}
%arcarrow, this is mine, for beerware purpose...
%Function: Draw an arrow from arctex coordinate specific nodes to another
%Arrow start at the start of arctext box and could be shifted to change the position
%to avoid go over another box.
%Var: 1:Start coordinate 2:End coordinate 3:angle to shift from acrtext box
defarcarrow[#1](#2)(#3)[#4]{
draw[thick,-,>=latex,color=#1,line width=1pt,shorten >=-2pt, shorten <=-2pt]
let p1 = (#2), p2 = (#3), % To access cartesian coordinates x, and y.
n1 = {veclen(x1,y1)}, % Distance from the origin
n2 = {veclen(x2,y2)}, % Distance from the origin
n3 = {atan2(y1,x1)} % Angle where acrtext starts.
in (n3-#4: n1) -- (n3-#4: n2); % Draw the arrow.
}
begin{document}
begin{tikzpicture}[
% Environment Cfg
font=sf scriptsize,
% Styles
myarrow/.style={
thick,
-latex,
},
Center/.style ={
circle,
fill=white,
text=root,
align=center,
font =footnotesize,
inner sep=1pt,
},
]
% Drawing the center
node[Center](ROOT) at (0,0) {Test \ Boy};
% Drawing the Tex Arcs
% Arctext[ID][box-style][box-height](radious)(start-angl)(end-angl){|text-styles| Text}
% Node 1: Father
arctext[N1][orange1][15pt](1.5)(180)(0){|footnotesizebfcolor{white}| John Boy B. 12 Jun 2016};
%Sub 1: Grandfather
arctext[N1S1][orange1][13pt](2.5)(180)(90){|footnotesizebfcolor{white}| Sub1};
%Sub 1-Sub 1: Great Grandfather
arctext[N1S1S1][orange1][8pt](3.25)(180)(135){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S1S1S1][orange1][8pt](3.8)(180)(157.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S1S1S2][orange1][8pt](3.8)(157.5)(135){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2: Great Grandmother
arctext[N1S1S2][orange1][8pt](3.25)(135)(90){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S1S2S1][orange1][8pt](3.8)(135)(112.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S1S2S2][orange1][8pt](3.8)(112.5)(90){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2: Grandmother
arctext[N1S2][orange1][13pt](2.5)(90)(0){|footnotesizebfcolor{white}| Sub2};
%Sub 2-Sub 1: Great Grandfather
arctext[N1S2S1][orange1][8pt](3.25)(90)(45){|footnotesizebfcolor{white}| Sub2-Sub1};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S2S1S1][orange1][8pt](3.8)(90)(67.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S2S1S2][orange1][8pt](3.8)(67.5)(45){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2-Sub 2: Great Grandmother
arctext[N1S2S2][orange1][8pt](3.25)(45)(0){|footnotesizebfcolor{white}| Sub2-Sub2};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S2S2S1][orange1][8pt](3.8)(45)(22.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S2S2S2][orange1][8pt](3.8)(22.5)(0){|footnotesizebfcolor{white}| Sub1-Sub2}
arctext[N2][orange2][15pt](1.5)(180)(360){|footnotesizebfcolor{white}| John Boy B. 12 Jun 2016};
%Sub 1: Grandfather
arctext[N2S1][orange2][13pt](2.5)(180)(270){|footnotesizebfcolor{white}| Sub1};
%Sub 1-Sub 1: Great Grandfather
arctext[N2S1S1][orange2][8pt](3.25)(180)(225){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S1S1S1][orange2][8pt](3.8)(180)(202.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S1S1S2][orange2][8pt](3.8)(202.5)(225){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2: Great Grandmother
arctext[N2S1S2][orange2][8pt](3.25)(225)(270){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S1S2S1][orange2][8pt](3.8)(225)(247.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S1S2S2][orange2][8pt](3.8)(247.5)(270){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2: Grandmother
arctext[N2S2][orange2][13pt](2.5)(270)(360){|footnotesizebfcolor{white}| Sub2};
%Sub 2-Sub 1: Great Grandfather
arctext[N2S2S1][orange2][8pt](3.25)(270)(315){|footnotesizebfcolor{white}| Sub2-Sub1};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S2S1S1][orange2][8pt](3.8)(270)(292.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S2S1S2][orange2][8pt](3.8)(292.5)(315){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2-Sub 2: Great Grandmother
arctext[N2S2S2][orange2][8pt](3.25)(315)(360){|footnotesizebfcolor{white}| Sub2-Sub2};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S2S2S1][orange2][8pt](3.8)(315)(337.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S2S2S2][orange2][8pt](3.8)(337.5)(360){|footnotesizebfcolor{white}| Sub1-Sub2}
end{tikzpicture}
end{document}

tikz-pgf charts genealogy
I took code previously posted here: Is there a way to make "sunburst charts" (multi-level pie charts) in LaTeX?
And I wanted to modify this for genealogy purposes. I have the setup I would like, but I am not sure how to modify the function such that I can have two lines of text for each arctext piece.
Can anyone help me to understand the function such that I can modify it for displaying two lines?
I think the "height" of the boxes is already coded and I can play with the function to adjust it for the size text accordingly.
Thanks.
documentclass[border=5pt]{standalone}
usepackage{xcolor}
definecolor{orange1}{HTML}{F1753A}
definecolor{orange2}{HTML}{F7A13E}
definecolor{orange3}{HTML}{FC6300}
definecolor{root}{HTML}{B2B2B2}
usepackage{tikz}
usepackage{pgfmath}
usetikzlibrary{decorations.text, arrows.meta,calc,shadows.blur,shadings}
renewcommand*familydefault{sfdefault} % Set font to serif family
% arctext from Andrew code with modifications:
%Variables: 1: ID, 2:Style 3:box height 4: Radious 5:start-angl 6:end-angl 7:text {format along path}
defarctext[#1][#2][#3](#4)(#5)(#6)#7{
draw[
color=white,
thick,
line width=1.3pt,
fill=#2
]
(#5:#4cm+#3) coordinate (above #1) arc (#5:#6:#4cm+#3)
-- (#6:#4) coordinate (right #1) -- (#6:#4cm-#3) coordinate (below right #1)
arc (#6:#5:#4cm-#3) coordinate (below #1)
-- (#5:#4) coordinate (left #1) -- cycle;
defa#1{#4cm+#3}
defb#1{#4cm-#3}
path[
decoration={
raise = -0.5ex, % Controls relavite text height position.
text along path,
text = {#7},
text align = center,
},
decorate
]
(#5:#4) arc (#5:#6:#4);
}
%arcarrow, this is mine, for beerware purpose...
%Function: Draw an arrow from arctex coordinate specific nodes to another
%Arrow start at the start of arctext box and could be shifted to change the position
%to avoid go over another box.
%Var: 1:Start coordinate 2:End coordinate 3:angle to shift from acrtext box
defarcarrow[#1](#2)(#3)[#4]{
draw[thick,-,>=latex,color=#1,line width=1pt,shorten >=-2pt, shorten <=-2pt]
let p1 = (#2), p2 = (#3), % To access cartesian coordinates x, and y.
n1 = {veclen(x1,y1)}, % Distance from the origin
n2 = {veclen(x2,y2)}, % Distance from the origin
n3 = {atan2(y1,x1)} % Angle where acrtext starts.
in (n3-#4: n1) -- (n3-#4: n2); % Draw the arrow.
}
begin{document}
begin{tikzpicture}[
% Environment Cfg
font=sf scriptsize,
% Styles
myarrow/.style={
thick,
-latex,
},
Center/.style ={
circle,
fill=white,
text=root,
align=center,
font =footnotesize,
inner sep=1pt,
},
]
% Drawing the center
node[Center](ROOT) at (0,0) {Test \ Boy};
% Drawing the Tex Arcs
% Arctext[ID][box-style][box-height](radious)(start-angl)(end-angl){|text-styles| Text}
% Node 1: Father
arctext[N1][orange1][15pt](1.5)(180)(0){|footnotesizebfcolor{white}| John Boy B. 12 Jun 2016};
%Sub 1: Grandfather
arctext[N1S1][orange1][13pt](2.5)(180)(90){|footnotesizebfcolor{white}| Sub1};
%Sub 1-Sub 1: Great Grandfather
arctext[N1S1S1][orange1][8pt](3.25)(180)(135){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S1S1S1][orange1][8pt](3.8)(180)(157.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S1S1S2][orange1][8pt](3.8)(157.5)(135){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2: Great Grandmother
arctext[N1S1S2][orange1][8pt](3.25)(135)(90){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S1S2S1][orange1][8pt](3.8)(135)(112.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S1S2S2][orange1][8pt](3.8)(112.5)(90){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2: Grandmother
arctext[N1S2][orange1][13pt](2.5)(90)(0){|footnotesizebfcolor{white}| Sub2};
%Sub 2-Sub 1: Great Grandfather
arctext[N1S2S1][orange1][8pt](3.25)(90)(45){|footnotesizebfcolor{white}| Sub2-Sub1};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S2S1S1][orange1][8pt](3.8)(90)(67.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S2S1S2][orange1][8pt](3.8)(67.5)(45){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2-Sub 2: Great Grandmother
arctext[N1S2S2][orange1][8pt](3.25)(45)(0){|footnotesizebfcolor{white}| Sub2-Sub2};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S2S2S1][orange1][8pt](3.8)(45)(22.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S2S2S2][orange1][8pt](3.8)(22.5)(0){|footnotesizebfcolor{white}| Sub1-Sub2}
arctext[N2][orange2][15pt](1.5)(180)(360){|footnotesizebfcolor{white}| John Boy B. 12 Jun 2016};
%Sub 1: Grandfather
arctext[N2S1][orange2][13pt](2.5)(180)(270){|footnotesizebfcolor{white}| Sub1};
%Sub 1-Sub 1: Great Grandfather
arctext[N2S1S1][orange2][8pt](3.25)(180)(225){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S1S1S1][orange2][8pt](3.8)(180)(202.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S1S1S2][orange2][8pt](3.8)(202.5)(225){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2: Great Grandmother
arctext[N2S1S2][orange2][8pt](3.25)(225)(270){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S1S2S1][orange2][8pt](3.8)(225)(247.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S1S2S2][orange2][8pt](3.8)(247.5)(270){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2: Grandmother
arctext[N2S2][orange2][13pt](2.5)(270)(360){|footnotesizebfcolor{white}| Sub2};
%Sub 2-Sub 1: Great Grandfather
arctext[N2S2S1][orange2][8pt](3.25)(270)(315){|footnotesizebfcolor{white}| Sub2-Sub1};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S2S1S1][orange2][8pt](3.8)(270)(292.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S2S1S2][orange2][8pt](3.8)(292.5)(315){|footnotesizebfcolor{white}| Sub1-Sub2}
%Sub 2-Sub 2: Great Grandmother
arctext[N2S2S2][orange2][8pt](3.25)(315)(360){|footnotesizebfcolor{white}| Sub2-Sub2};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S2S2S1][orange2][8pt](3.8)(315)(337.5){|footnotesizebfcolor{white}| Sub1-Sub1};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S2S2S2][orange2][8pt](3.8)(337.5)(360){|footnotesizebfcolor{white}| Sub1-Sub2}
end{tikzpicture}
end{document}

tikz-pgf charts genealogy
tikz-pgf charts genealogy
asked Jan 13 at 8:19
DakotaDakota
254
254
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can add an eighth argument to the arctext macro, and then in the definition of it add a second path with the text along path decoration. Modify the raise value, so they are placed one above the other, and possibly reduce the font size. Then instead of just arctext...{one line of text}, use arctext...{first line}{second line}.
Unrelated: I changed sf and bf to sffamily and bfseries respectively, as the shorter forms have been deprecated since the early 90s.

documentclass[border=5pt]{standalone}
usepackage{tikz}
usetikzlibrary{decorations.text}
definecolor{orange1}{HTML}{F1753A}
definecolor{orange2}{HTML}{F7A13E}
definecolor{orange3}{HTML}{FC6300}
definecolor{root}{HTML}{B2B2B2}
renewcommand*familydefault{sfdefault} % Set font to serif family
% arctext from Andrew code with modifications:
%Variables: 1: ID, 2:Style 3:box height 4: Radious 5:start-angl 6:end-angl 7:text {format along path}
defarctext[#1][#2][#3](#4)(#5)(#6)#7#8{% <-- added #8 here
draw[
color=white,
thick,
line width=1.3pt,
fill=#2
]
(#5:#4cm+#3) coordinate (above #1) arc (#5:#6:#4cm+#3)
-- (#6:#4) coordinate (right #1) -- (#6:#4cm-#3) coordinate (below right #1)
arc (#6:#5:#4cm-#3) coordinate (below #1)
-- (#5:#4) coordinate (left #1) -- cycle;
defa#1{#4cm+#3}
defb#1{#4cm-#3}
path[
decoration={
raise = 0.1ex, % Controls relative text height position. <--- CHANGED
text along path,
text = {#7},
text align = center,
text color=white,
},
decorate
]
(#5:#4) arc (#5:#6:#4);
% added second path
path[
decoration={
raise = -0.9ex, % different value
text along path,
text = {#8}, % <-- #8 instead of #7
text align = center,
text color=white,
},
decorate
]
(#5:#4) arc (#5:#6:#4);
}
%arcarrow, this is mine, for beerware purpose...
%Function: Draw an arrow from arctex coordinate specific nodes to another
%Arrow start at the start of arctext box and could be shifted to change the position
%to avoid go over another box.
%Var: 1:Start coordinate 2:End coordinate 3:angle to shift from acrtext box
defarcarrow[#1](#2)(#3)[#4]{
draw[thick,-,>=latex,color=#1,line width=1pt,shorten >=-2pt, shorten <=-2pt]
let p1 = (#2), p2 = (#3), % To access cartesian coordinates x, and y.
n1 = {veclen(x1,y1)}, % Distance from the origin
n2 = {veclen(x2,y2)}, % Distance from the origin
n3 = {atan2(y1,x1)} % Angle where acrtext starts.
in (n3-#4: n1) -- (n3-#4: n2); % Draw the arrow.
}
begin{document}
begin{tikzpicture}[
% Environment Cfg
font=sffamilyscriptsize,
% Styles
myarrow/.style={
thick,
-latex,
},
Center/.style ={
circle,
fill=white,
text=root,
align=center,
font =footnotesize,
inner sep=1pt,
},
]
% Drawing the center
node[Center](ROOT) at (0,0) {Test \ Boy};
% Drawing the Tex Arcs
% Arctext[ID][box-style][box-height](radious)(start-angl)(end-angl){|text-styles| Text}
% Node 1: Father
arctext[N1][orange1][15pt](1.5)(180)(0){|tinybfseries| John Boy B. 12 Jun 2016}{|tiny| foo bar baz};
%Sub 1: Grandfather
arctext[N1S1][orange1][13pt](2.5)(180)(90){|tinybfseries| Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1: Great Grandfather
arctext[N1S1S1][orange1][8pt](3.25)(180)(135){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S1S1S1][orange1][8pt](3.8)(180)(157.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S1S1S2][orange1][8pt](3.8)(157.5)(135){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2: Great Grandmother
arctext[N1S1S2][orange1][8pt](3.25)(135)(90){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S1S2S1][orange1][8pt](3.8)(135)(112.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S1S2S2][orange1][8pt](3.8)(112.5)(90){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2: Grandmother
arctext[N1S2][orange1][13pt](2.5)(90)(0){|tinybfseries| Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 1: Great Grandfather
arctext[N1S2S1][orange1][8pt](3.25)(90)(45){|tinybfseries| Sub2-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S2S1S1][orange1][8pt](3.8)(90)(67.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S2S1S2][orange1][8pt](3.8)(67.5)(45){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2-Sub 2: Great Grandmother
arctext[N1S2S2][orange1][8pt](3.25)(45)(0){|tinybfseries| Sub2-Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S2S2S1][orange1][8pt](3.8)(45)(22.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S2S2S2][orange1][8pt](3.8)(22.5)(0){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
arctext[N2][orange2][15pt](1.5)(180)(360){|tinybfseries| John Boy B. 12 Jun 2016}{|tiny| foo bar baz};
%Sub 1: Grandfather
arctext[N2S1][orange2][13pt](2.5)(180)(270){|tinybfseries| Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1: Great Grandfather
arctext[N2S1S1][orange2][8pt](3.25)(180)(225){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S1S1S1][orange2][8pt](3.8)(180)(202.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S1S1S2][orange2][8pt](3.8)(202.5)(225){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2: Great Grandmother
arctext[N2S1S2][orange2][8pt](3.25)(225)(270){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S1S2S1][orange2][8pt](3.8)(225)(247.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S1S2S2][orange2][8pt](3.8)(247.5)(270){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2: Grandmother
arctext[N2S2][orange2][13pt](2.5)(270)(360){|tinybfseries| Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 1: Great Grandfather
arctext[N2S2S1][orange2][8pt](3.25)(270)(315){|tinybfseries| Sub2-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S2S1S1][orange2][8pt](3.8)(270)(292.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S2S1S2][orange2][8pt](3.8)(292.5)(315){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2-Sub 2: Great Grandmother
arctext[N2S2S2][orange2][8pt](3.25)(315)(360){|tinybfseries| Sub2-Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S2S2S1][orange2][8pt](3.8)(315)(337.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S2S2S2][orange2][8pt](3.8)(337.5)(360){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
end{tikzpicture}
end{document}
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469925%2fhelp-modifying-sunburst-chart-code-for-genealogy-purposes%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can add an eighth argument to the arctext macro, and then in the definition of it add a second path with the text along path decoration. Modify the raise value, so they are placed one above the other, and possibly reduce the font size. Then instead of just arctext...{one line of text}, use arctext...{first line}{second line}.
Unrelated: I changed sf and bf to sffamily and bfseries respectively, as the shorter forms have been deprecated since the early 90s.

documentclass[border=5pt]{standalone}
usepackage{tikz}
usetikzlibrary{decorations.text}
definecolor{orange1}{HTML}{F1753A}
definecolor{orange2}{HTML}{F7A13E}
definecolor{orange3}{HTML}{FC6300}
definecolor{root}{HTML}{B2B2B2}
renewcommand*familydefault{sfdefault} % Set font to serif family
% arctext from Andrew code with modifications:
%Variables: 1: ID, 2:Style 3:box height 4: Radious 5:start-angl 6:end-angl 7:text {format along path}
defarctext[#1][#2][#3](#4)(#5)(#6)#7#8{% <-- added #8 here
draw[
color=white,
thick,
line width=1.3pt,
fill=#2
]
(#5:#4cm+#3) coordinate (above #1) arc (#5:#6:#4cm+#3)
-- (#6:#4) coordinate (right #1) -- (#6:#4cm-#3) coordinate (below right #1)
arc (#6:#5:#4cm-#3) coordinate (below #1)
-- (#5:#4) coordinate (left #1) -- cycle;
defa#1{#4cm+#3}
defb#1{#4cm-#3}
path[
decoration={
raise = 0.1ex, % Controls relative text height position. <--- CHANGED
text along path,
text = {#7},
text align = center,
text color=white,
},
decorate
]
(#5:#4) arc (#5:#6:#4);
% added second path
path[
decoration={
raise = -0.9ex, % different value
text along path,
text = {#8}, % <-- #8 instead of #7
text align = center,
text color=white,
},
decorate
]
(#5:#4) arc (#5:#6:#4);
}
%arcarrow, this is mine, for beerware purpose...
%Function: Draw an arrow from arctex coordinate specific nodes to another
%Arrow start at the start of arctext box and could be shifted to change the position
%to avoid go over another box.
%Var: 1:Start coordinate 2:End coordinate 3:angle to shift from acrtext box
defarcarrow[#1](#2)(#3)[#4]{
draw[thick,-,>=latex,color=#1,line width=1pt,shorten >=-2pt, shorten <=-2pt]
let p1 = (#2), p2 = (#3), % To access cartesian coordinates x, and y.
n1 = {veclen(x1,y1)}, % Distance from the origin
n2 = {veclen(x2,y2)}, % Distance from the origin
n3 = {atan2(y1,x1)} % Angle where acrtext starts.
in (n3-#4: n1) -- (n3-#4: n2); % Draw the arrow.
}
begin{document}
begin{tikzpicture}[
% Environment Cfg
font=sffamilyscriptsize,
% Styles
myarrow/.style={
thick,
-latex,
},
Center/.style ={
circle,
fill=white,
text=root,
align=center,
font =footnotesize,
inner sep=1pt,
},
]
% Drawing the center
node[Center](ROOT) at (0,0) {Test \ Boy};
% Drawing the Tex Arcs
% Arctext[ID][box-style][box-height](radious)(start-angl)(end-angl){|text-styles| Text}
% Node 1: Father
arctext[N1][orange1][15pt](1.5)(180)(0){|tinybfseries| John Boy B. 12 Jun 2016}{|tiny| foo bar baz};
%Sub 1: Grandfather
arctext[N1S1][orange1][13pt](2.5)(180)(90){|tinybfseries| Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1: Great Grandfather
arctext[N1S1S1][orange1][8pt](3.25)(180)(135){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S1S1S1][orange1][8pt](3.8)(180)(157.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S1S1S2][orange1][8pt](3.8)(157.5)(135){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2: Great Grandmother
arctext[N1S1S2][orange1][8pt](3.25)(135)(90){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S1S2S1][orange1][8pt](3.8)(135)(112.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S1S2S2][orange1][8pt](3.8)(112.5)(90){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2: Grandmother
arctext[N1S2][orange1][13pt](2.5)(90)(0){|tinybfseries| Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 1: Great Grandfather
arctext[N1S2S1][orange1][8pt](3.25)(90)(45){|tinybfseries| Sub2-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S2S1S1][orange1][8pt](3.8)(90)(67.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S2S1S2][orange1][8pt](3.8)(67.5)(45){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2-Sub 2: Great Grandmother
arctext[N1S2S2][orange1][8pt](3.25)(45)(0){|tinybfseries| Sub2-Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S2S2S1][orange1][8pt](3.8)(45)(22.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S2S2S2][orange1][8pt](3.8)(22.5)(0){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
arctext[N2][orange2][15pt](1.5)(180)(360){|tinybfseries| John Boy B. 12 Jun 2016}{|tiny| foo bar baz};
%Sub 1: Grandfather
arctext[N2S1][orange2][13pt](2.5)(180)(270){|tinybfseries| Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1: Great Grandfather
arctext[N2S1S1][orange2][8pt](3.25)(180)(225){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S1S1S1][orange2][8pt](3.8)(180)(202.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S1S1S2][orange2][8pt](3.8)(202.5)(225){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2: Great Grandmother
arctext[N2S1S2][orange2][8pt](3.25)(225)(270){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S1S2S1][orange2][8pt](3.8)(225)(247.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S1S2S2][orange2][8pt](3.8)(247.5)(270){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2: Grandmother
arctext[N2S2][orange2][13pt](2.5)(270)(360){|tinybfseries| Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 1: Great Grandfather
arctext[N2S2S1][orange2][8pt](3.25)(270)(315){|tinybfseries| Sub2-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S2S1S1][orange2][8pt](3.8)(270)(292.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S2S1S2][orange2][8pt](3.8)(292.5)(315){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2-Sub 2: Great Grandmother
arctext[N2S2S2][orange2][8pt](3.25)(315)(360){|tinybfseries| Sub2-Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S2S2S1][orange2][8pt](3.8)(315)(337.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S2S2S2][orange2][8pt](3.8)(337.5)(360){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
end{tikzpicture}
end{document}
add a comment |
You can add an eighth argument to the arctext macro, and then in the definition of it add a second path with the text along path decoration. Modify the raise value, so they are placed one above the other, and possibly reduce the font size. Then instead of just arctext...{one line of text}, use arctext...{first line}{second line}.
Unrelated: I changed sf and bf to sffamily and bfseries respectively, as the shorter forms have been deprecated since the early 90s.

documentclass[border=5pt]{standalone}
usepackage{tikz}
usetikzlibrary{decorations.text}
definecolor{orange1}{HTML}{F1753A}
definecolor{orange2}{HTML}{F7A13E}
definecolor{orange3}{HTML}{FC6300}
definecolor{root}{HTML}{B2B2B2}
renewcommand*familydefault{sfdefault} % Set font to serif family
% arctext from Andrew code with modifications:
%Variables: 1: ID, 2:Style 3:box height 4: Radious 5:start-angl 6:end-angl 7:text {format along path}
defarctext[#1][#2][#3](#4)(#5)(#6)#7#8{% <-- added #8 here
draw[
color=white,
thick,
line width=1.3pt,
fill=#2
]
(#5:#4cm+#3) coordinate (above #1) arc (#5:#6:#4cm+#3)
-- (#6:#4) coordinate (right #1) -- (#6:#4cm-#3) coordinate (below right #1)
arc (#6:#5:#4cm-#3) coordinate (below #1)
-- (#5:#4) coordinate (left #1) -- cycle;
defa#1{#4cm+#3}
defb#1{#4cm-#3}
path[
decoration={
raise = 0.1ex, % Controls relative text height position. <--- CHANGED
text along path,
text = {#7},
text align = center,
text color=white,
},
decorate
]
(#5:#4) arc (#5:#6:#4);
% added second path
path[
decoration={
raise = -0.9ex, % different value
text along path,
text = {#8}, % <-- #8 instead of #7
text align = center,
text color=white,
},
decorate
]
(#5:#4) arc (#5:#6:#4);
}
%arcarrow, this is mine, for beerware purpose...
%Function: Draw an arrow from arctex coordinate specific nodes to another
%Arrow start at the start of arctext box and could be shifted to change the position
%to avoid go over another box.
%Var: 1:Start coordinate 2:End coordinate 3:angle to shift from acrtext box
defarcarrow[#1](#2)(#3)[#4]{
draw[thick,-,>=latex,color=#1,line width=1pt,shorten >=-2pt, shorten <=-2pt]
let p1 = (#2), p2 = (#3), % To access cartesian coordinates x, and y.
n1 = {veclen(x1,y1)}, % Distance from the origin
n2 = {veclen(x2,y2)}, % Distance from the origin
n3 = {atan2(y1,x1)} % Angle where acrtext starts.
in (n3-#4: n1) -- (n3-#4: n2); % Draw the arrow.
}
begin{document}
begin{tikzpicture}[
% Environment Cfg
font=sffamilyscriptsize,
% Styles
myarrow/.style={
thick,
-latex,
},
Center/.style ={
circle,
fill=white,
text=root,
align=center,
font =footnotesize,
inner sep=1pt,
},
]
% Drawing the center
node[Center](ROOT) at (0,0) {Test \ Boy};
% Drawing the Tex Arcs
% Arctext[ID][box-style][box-height](radious)(start-angl)(end-angl){|text-styles| Text}
% Node 1: Father
arctext[N1][orange1][15pt](1.5)(180)(0){|tinybfseries| John Boy B. 12 Jun 2016}{|tiny| foo bar baz};
%Sub 1: Grandfather
arctext[N1S1][orange1][13pt](2.5)(180)(90){|tinybfseries| Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1: Great Grandfather
arctext[N1S1S1][orange1][8pt](3.25)(180)(135){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S1S1S1][orange1][8pt](3.8)(180)(157.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S1S1S2][orange1][8pt](3.8)(157.5)(135){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2: Great Grandmother
arctext[N1S1S2][orange1][8pt](3.25)(135)(90){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S1S2S1][orange1][8pt](3.8)(135)(112.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S1S2S2][orange1][8pt](3.8)(112.5)(90){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2: Grandmother
arctext[N1S2][orange1][13pt](2.5)(90)(0){|tinybfseries| Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 1: Great Grandfather
arctext[N1S2S1][orange1][8pt](3.25)(90)(45){|tinybfseries| Sub2-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S2S1S1][orange1][8pt](3.8)(90)(67.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S2S1S2][orange1][8pt](3.8)(67.5)(45){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2-Sub 2: Great Grandmother
arctext[N1S2S2][orange1][8pt](3.25)(45)(0){|tinybfseries| Sub2-Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S2S2S1][orange1][8pt](3.8)(45)(22.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S2S2S2][orange1][8pt](3.8)(22.5)(0){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
arctext[N2][orange2][15pt](1.5)(180)(360){|tinybfseries| John Boy B. 12 Jun 2016}{|tiny| foo bar baz};
%Sub 1: Grandfather
arctext[N2S1][orange2][13pt](2.5)(180)(270){|tinybfseries| Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1: Great Grandfather
arctext[N2S1S1][orange2][8pt](3.25)(180)(225){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S1S1S1][orange2][8pt](3.8)(180)(202.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S1S1S2][orange2][8pt](3.8)(202.5)(225){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2: Great Grandmother
arctext[N2S1S2][orange2][8pt](3.25)(225)(270){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S1S2S1][orange2][8pt](3.8)(225)(247.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S1S2S2][orange2][8pt](3.8)(247.5)(270){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2: Grandmother
arctext[N2S2][orange2][13pt](2.5)(270)(360){|tinybfseries| Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 1: Great Grandfather
arctext[N2S2S1][orange2][8pt](3.25)(270)(315){|tinybfseries| Sub2-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S2S1S1][orange2][8pt](3.8)(270)(292.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S2S1S2][orange2][8pt](3.8)(292.5)(315){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2-Sub 2: Great Grandmother
arctext[N2S2S2][orange2][8pt](3.25)(315)(360){|tinybfseries| Sub2-Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S2S2S1][orange2][8pt](3.8)(315)(337.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S2S2S2][orange2][8pt](3.8)(337.5)(360){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
end{tikzpicture}
end{document}
add a comment |
You can add an eighth argument to the arctext macro, and then in the definition of it add a second path with the text along path decoration. Modify the raise value, so they are placed one above the other, and possibly reduce the font size. Then instead of just arctext...{one line of text}, use arctext...{first line}{second line}.
Unrelated: I changed sf and bf to sffamily and bfseries respectively, as the shorter forms have been deprecated since the early 90s.

documentclass[border=5pt]{standalone}
usepackage{tikz}
usetikzlibrary{decorations.text}
definecolor{orange1}{HTML}{F1753A}
definecolor{orange2}{HTML}{F7A13E}
definecolor{orange3}{HTML}{FC6300}
definecolor{root}{HTML}{B2B2B2}
renewcommand*familydefault{sfdefault} % Set font to serif family
% arctext from Andrew code with modifications:
%Variables: 1: ID, 2:Style 3:box height 4: Radious 5:start-angl 6:end-angl 7:text {format along path}
defarctext[#1][#2][#3](#4)(#5)(#6)#7#8{% <-- added #8 here
draw[
color=white,
thick,
line width=1.3pt,
fill=#2
]
(#5:#4cm+#3) coordinate (above #1) arc (#5:#6:#4cm+#3)
-- (#6:#4) coordinate (right #1) -- (#6:#4cm-#3) coordinate (below right #1)
arc (#6:#5:#4cm-#3) coordinate (below #1)
-- (#5:#4) coordinate (left #1) -- cycle;
defa#1{#4cm+#3}
defb#1{#4cm-#3}
path[
decoration={
raise = 0.1ex, % Controls relative text height position. <--- CHANGED
text along path,
text = {#7},
text align = center,
text color=white,
},
decorate
]
(#5:#4) arc (#5:#6:#4);
% added second path
path[
decoration={
raise = -0.9ex, % different value
text along path,
text = {#8}, % <-- #8 instead of #7
text align = center,
text color=white,
},
decorate
]
(#5:#4) arc (#5:#6:#4);
}
%arcarrow, this is mine, for beerware purpose...
%Function: Draw an arrow from arctex coordinate specific nodes to another
%Arrow start at the start of arctext box and could be shifted to change the position
%to avoid go over another box.
%Var: 1:Start coordinate 2:End coordinate 3:angle to shift from acrtext box
defarcarrow[#1](#2)(#3)[#4]{
draw[thick,-,>=latex,color=#1,line width=1pt,shorten >=-2pt, shorten <=-2pt]
let p1 = (#2), p2 = (#3), % To access cartesian coordinates x, and y.
n1 = {veclen(x1,y1)}, % Distance from the origin
n2 = {veclen(x2,y2)}, % Distance from the origin
n3 = {atan2(y1,x1)} % Angle where acrtext starts.
in (n3-#4: n1) -- (n3-#4: n2); % Draw the arrow.
}
begin{document}
begin{tikzpicture}[
% Environment Cfg
font=sffamilyscriptsize,
% Styles
myarrow/.style={
thick,
-latex,
},
Center/.style ={
circle,
fill=white,
text=root,
align=center,
font =footnotesize,
inner sep=1pt,
},
]
% Drawing the center
node[Center](ROOT) at (0,0) {Test \ Boy};
% Drawing the Tex Arcs
% Arctext[ID][box-style][box-height](radious)(start-angl)(end-angl){|text-styles| Text}
% Node 1: Father
arctext[N1][orange1][15pt](1.5)(180)(0){|tinybfseries| John Boy B. 12 Jun 2016}{|tiny| foo bar baz};
%Sub 1: Grandfather
arctext[N1S1][orange1][13pt](2.5)(180)(90){|tinybfseries| Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1: Great Grandfather
arctext[N1S1S1][orange1][8pt](3.25)(180)(135){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S1S1S1][orange1][8pt](3.8)(180)(157.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S1S1S2][orange1][8pt](3.8)(157.5)(135){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2: Great Grandmother
arctext[N1S1S2][orange1][8pt](3.25)(135)(90){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S1S2S1][orange1][8pt](3.8)(135)(112.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S1S2S2][orange1][8pt](3.8)(112.5)(90){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2: Grandmother
arctext[N1S2][orange1][13pt](2.5)(90)(0){|tinybfseries| Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 1: Great Grandfather
arctext[N1S2S1][orange1][8pt](3.25)(90)(45){|tinybfseries| Sub2-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S2S1S1][orange1][8pt](3.8)(90)(67.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S2S1S2][orange1][8pt](3.8)(67.5)(45){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2-Sub 2: Great Grandmother
arctext[N1S2S2][orange1][8pt](3.25)(45)(0){|tinybfseries| Sub2-Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S2S2S1][orange1][8pt](3.8)(45)(22.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S2S2S2][orange1][8pt](3.8)(22.5)(0){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
arctext[N2][orange2][15pt](1.5)(180)(360){|tinybfseries| John Boy B. 12 Jun 2016}{|tiny| foo bar baz};
%Sub 1: Grandfather
arctext[N2S1][orange2][13pt](2.5)(180)(270){|tinybfseries| Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1: Great Grandfather
arctext[N2S1S1][orange2][8pt](3.25)(180)(225){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S1S1S1][orange2][8pt](3.8)(180)(202.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S1S1S2][orange2][8pt](3.8)(202.5)(225){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2: Great Grandmother
arctext[N2S1S2][orange2][8pt](3.25)(225)(270){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S1S2S1][orange2][8pt](3.8)(225)(247.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S1S2S2][orange2][8pt](3.8)(247.5)(270){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2: Grandmother
arctext[N2S2][orange2][13pt](2.5)(270)(360){|tinybfseries| Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 1: Great Grandfather
arctext[N2S2S1][orange2][8pt](3.25)(270)(315){|tinybfseries| Sub2-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S2S1S1][orange2][8pt](3.8)(270)(292.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S2S1S2][orange2][8pt](3.8)(292.5)(315){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2-Sub 2: Great Grandmother
arctext[N2S2S2][orange2][8pt](3.25)(315)(360){|tinybfseries| Sub2-Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S2S2S1][orange2][8pt](3.8)(315)(337.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S2S2S2][orange2][8pt](3.8)(337.5)(360){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
end{tikzpicture}
end{document}
You can add an eighth argument to the arctext macro, and then in the definition of it add a second path with the text along path decoration. Modify the raise value, so they are placed one above the other, and possibly reduce the font size. Then instead of just arctext...{one line of text}, use arctext...{first line}{second line}.
Unrelated: I changed sf and bf to sffamily and bfseries respectively, as the shorter forms have been deprecated since the early 90s.

documentclass[border=5pt]{standalone}
usepackage{tikz}
usetikzlibrary{decorations.text}
definecolor{orange1}{HTML}{F1753A}
definecolor{orange2}{HTML}{F7A13E}
definecolor{orange3}{HTML}{FC6300}
definecolor{root}{HTML}{B2B2B2}
renewcommand*familydefault{sfdefault} % Set font to serif family
% arctext from Andrew code with modifications:
%Variables: 1: ID, 2:Style 3:box height 4: Radious 5:start-angl 6:end-angl 7:text {format along path}
defarctext[#1][#2][#3](#4)(#5)(#6)#7#8{% <-- added #8 here
draw[
color=white,
thick,
line width=1.3pt,
fill=#2
]
(#5:#4cm+#3) coordinate (above #1) arc (#5:#6:#4cm+#3)
-- (#6:#4) coordinate (right #1) -- (#6:#4cm-#3) coordinate (below right #1)
arc (#6:#5:#4cm-#3) coordinate (below #1)
-- (#5:#4) coordinate (left #1) -- cycle;
defa#1{#4cm+#3}
defb#1{#4cm-#3}
path[
decoration={
raise = 0.1ex, % Controls relative text height position. <--- CHANGED
text along path,
text = {#7},
text align = center,
text color=white,
},
decorate
]
(#5:#4) arc (#5:#6:#4);
% added second path
path[
decoration={
raise = -0.9ex, % different value
text along path,
text = {#8}, % <-- #8 instead of #7
text align = center,
text color=white,
},
decorate
]
(#5:#4) arc (#5:#6:#4);
}
%arcarrow, this is mine, for beerware purpose...
%Function: Draw an arrow from arctex coordinate specific nodes to another
%Arrow start at the start of arctext box and could be shifted to change the position
%to avoid go over another box.
%Var: 1:Start coordinate 2:End coordinate 3:angle to shift from acrtext box
defarcarrow[#1](#2)(#3)[#4]{
draw[thick,-,>=latex,color=#1,line width=1pt,shorten >=-2pt, shorten <=-2pt]
let p1 = (#2), p2 = (#3), % To access cartesian coordinates x, and y.
n1 = {veclen(x1,y1)}, % Distance from the origin
n2 = {veclen(x2,y2)}, % Distance from the origin
n3 = {atan2(y1,x1)} % Angle where acrtext starts.
in (n3-#4: n1) -- (n3-#4: n2); % Draw the arrow.
}
begin{document}
begin{tikzpicture}[
% Environment Cfg
font=sffamilyscriptsize,
% Styles
myarrow/.style={
thick,
-latex,
},
Center/.style ={
circle,
fill=white,
text=root,
align=center,
font =footnotesize,
inner sep=1pt,
},
]
% Drawing the center
node[Center](ROOT) at (0,0) {Test \ Boy};
% Drawing the Tex Arcs
% Arctext[ID][box-style][box-height](radious)(start-angl)(end-angl){|text-styles| Text}
% Node 1: Father
arctext[N1][orange1][15pt](1.5)(180)(0){|tinybfseries| John Boy B. 12 Jun 2016}{|tiny| foo bar baz};
%Sub 1: Grandfather
arctext[N1S1][orange1][13pt](2.5)(180)(90){|tinybfseries| Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1: Great Grandfather
arctext[N1S1S1][orange1][8pt](3.25)(180)(135){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S1S1S1][orange1][8pt](3.8)(180)(157.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S1S1S2][orange1][8pt](3.8)(157.5)(135){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2: Great Grandmother
arctext[N1S1S2][orange1][8pt](3.25)(135)(90){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S1S2S1][orange1][8pt](3.8)(135)(112.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S1S2S2][orange1][8pt](3.8)(112.5)(90){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2: Grandmother
arctext[N1S2][orange1][13pt](2.5)(90)(0){|tinybfseries| Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 1: Great Grandfather
arctext[N1S2S1][orange1][8pt](3.25)(90)(45){|tinybfseries| Sub2-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N1S2S1S1][orange1][8pt](3.8)(90)(67.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N1S2S1S2][orange1][8pt](3.8)(67.5)(45){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2-Sub 2: Great Grandmother
arctext[N1S2S2][orange1][8pt](3.25)(45)(0){|tinybfseries| Sub2-Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N1S2S2S1][orange1][8pt](3.8)(45)(22.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N1S2S2S2][orange1][8pt](3.8)(22.5)(0){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
arctext[N2][orange2][15pt](1.5)(180)(360){|tinybfseries| John Boy B. 12 Jun 2016}{|tiny| foo bar baz};
%Sub 1: Grandfather
arctext[N2S1][orange2][13pt](2.5)(180)(270){|tinybfseries| Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1: Great Grandfather
arctext[N2S1S1][orange2][8pt](3.25)(180)(225){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S1S1S1][orange2][8pt](3.8)(180)(202.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S1S1S2][orange2][8pt](3.8)(202.5)(225){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2: Great Grandmother
arctext[N2S1S2][orange2][8pt](3.25)(225)(270){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 1-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S1S2S1][orange2][8pt](3.8)(225)(247.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 1-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S1S2S2][orange2][8pt](3.8)(247.5)(270){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2: Grandmother
arctext[N2S2][orange2][13pt](2.5)(270)(360){|tinybfseries| Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 1: Great Grandfather
arctext[N2S2S1][orange2][8pt](3.25)(270)(315){|tinybfseries| Sub2-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 1: Great-Great Grandfather
arctext[N2S2S1S1][orange2][8pt](3.8)(270)(292.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 1-Sub 2: Great-Great Grandmother
arctext[N2S2S1S2][orange2][8pt](3.8)(292.5)(315){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
%Sub 2-Sub 2: Great Grandmother
arctext[N2S2S2][orange2][8pt](3.25)(315)(360){|tinybfseries| Sub2-Sub2}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 1: Great-Great Grandfather
arctext[N2S2S2S1][orange2][8pt](3.8)(315)(337.5){|tinybfseries| Sub1-Sub1}{|tiny| foo bar baz};
%Sub 2-Sub 2-Sub 2: Great-Great Grandmother
arctext[N2S2S2S2][orange2][8pt](3.8)(337.5)(360){|tinybfseries| Sub1-Sub2}{|tiny| foo bar baz}
end{tikzpicture}
end{document}
answered Jan 13 at 9:59
Torbjørn T.Torbjørn T.
156k13250437
156k13250437
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469925%2fhelp-modifying-sunburst-chart-code-for-genealogy-purposes%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown