Template:Tree chart/doc

From Dothack Info
Jump to navigation Jump to search

Lua error: Internal error: The interpreter exited with status 1. Lua error: Internal error: The interpreter exited with status 1. Lua error: Internal error: The interpreter exited with status 1.

Usage

This template produces one row in a "family tree"-like chart consisting of boxes and connecting lines based loosely on an ASCII art-like syntax. It is meant to be used in conjunction with {{Tree chart/start}} and {{Tree chart/end}}. The chart is displayed as HTML tables using CSS attributes, and may contain arbitrary wiki markup within the boxes. This implementation was based on the now-deprecated {{family tree}} template.

Basic example

This code: <syntaxhighlight lang="wikitext">

Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.

</syntaxhighlight>

produces this:

Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.

This chart visually displays the information that I have a brother Joe and a little sister; my mom married my dad; and my dad's parents were Grandma and Grandpa; and my dad's parents had another child, Aunt Daisy. The code above produces a table of size 9 rows x 18 columns as shown below.

The table structure created using the example above
The table structure created using the example above

Collapsible basic example

This code uses {{chart top}}: <syntaxhighlight lang="wikitext">

An example family tree
Lua error: Internal error: The interpreter exited with status 1. Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.

</syntaxhighlight>

produces this:

An example family tree
Lua error: Internal error: The interpreter exited with status 1. Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.

This chart visually displays the information that I have a brother Joe and a little sister; my mom married my dad; and my dad's parents were Grandma and Grandpa; and my dad's parents had another child, Aunt Daisy.

Parameters

The template accepts any number of unnamed parameters with each parameter specifying a tile or a box.

  • Boxes can contain arbitrary wiki markup. The content of each box is specified using additional named parameters appended to the template call. Each box is three tiles wide and normally has a black border two pixels wide. Boxes can have any name that is a valid template parameter name, subject to a minimum of two alphabetical characters.
  • Tiles are line drawing symbols used to connect the boxes. They consist of various styles of horizontal and vertical lines along with corners and crossings as needed. Tiles are specified using their one- or two-character name: for the most common tiles, that character is more or less approximate to the tile's appearance. A special case of a tile is the empty tile, specified by a single space character. A table of available tiles is given below.
Solid lines:
! Lua error: Internal error: The interpreter exited with status 1.
  , Lua error: Internal error: The interpreter exited with status 1.
  v Lua error: Internal error: The interpreter exited with status 1.
  . Lua error: Internal error: The interpreter exited with status 1.
 
- Lua error: Internal error: The interpreter exited with status 1.
  ) Lua error: Internal error: The interpreter exited with status 1.
  + Lua error: Internal error: The interpreter exited with status 1.
  ( Lua error: Internal error: The interpreter exited with status 1.
 
` Lua error: Internal error: The interpreter exited with status 1.
  ^ Lua error: Internal error: The interpreter exited with status 1.
  ' Lua error: Internal error: The interpreter exited with status 1.
 
Dashed lines:
: Lua error: Internal error: The interpreter exited with status 1.
  F Lua error: Internal error: The interpreter exited with status 1.
  V Lua error: Internal error: The interpreter exited with status 1.
  7 Lua error: Internal error: The interpreter exited with status 1.
 
~ Lua error: Internal error: The interpreter exited with status 1.
  D Lua error: Internal error: The interpreter exited with status 1.
  % Lua error: Internal error: The interpreter exited with status 1.
  C Lua error: Internal error: The interpreter exited with status 1.
 
L Lua error: Internal error: The interpreter exited with status 1.
  A Lua error: Internal error: The interpreter exited with status 1.
  J Lua error: Internal error: The interpreter exited with status 1.
 
Dotted lines:
Q Lua error: Internal error: The interpreter exited with status 1.
  S Lua error: Internal error: The interpreter exited with status 1.
  M Lua error: Internal error: The interpreter exited with status 1.
  T Lua error: Internal error: The interpreter exited with status 1.
 
P Lua error: Internal error: The interpreter exited with status 1.
  H Lua error: Internal error: The interpreter exited with status 1.
  R Lua error: Internal error: The interpreter exited with status 1.
  G Lua error: Internal error: The interpreter exited with status 1.
 
Y Lua error: Internal error: The interpreter exited with status 1.
  W Lua error: Internal error: The interpreter exited with status 1.
  Z Lua error: Internal error: The interpreter exited with status 1.
 
Dashes hrzntl solid vrtcl:
fy Lua error: Internal error: The interpreter exited with status 1.
y Lua error: Internal error: The interpreter exited with status 1.
ye Lua error: Internal error: The interpreter exited with status 1.
f Lua error: Internal error: The interpreter exited with status 1.
t Lua error: Internal error: The interpreter exited with status 1.
e Lua error: Internal error: The interpreter exited with status 1.
fh Lua error: Internal error: The interpreter exited with status 1.
h Lua error: Internal error: The interpreter exited with status 1.
he Lua error: Internal error: The interpreter exited with status 1.
Solid hrzntl dashes vrtcl:
dj Lua error: Internal error: The interpreter exited with status 1.
j Lua error: Internal error: The interpreter exited with status 1.
jc Lua error: Internal error: The interpreter exited with status 1.
d Lua error: Internal error: The interpreter exited with status 1.
* Lua error: Internal error: The interpreter exited with status 1.
c Lua error: Internal error: The interpreter exited with status 1.
di Lua error: Internal error: The interpreter exited with status 1.
i Lua error: Internal error: The interpreter exited with status 1.
ic Lua error: Internal error: The interpreter exited with status 1.
Solid hrzntl dot vrtcl:
kr Lua error: Internal error: The interpreter exited with status 1.
r Lua error: Internal error: The interpreter exited with status 1.
rl Lua error: Internal error: The interpreter exited with status 1.
k Lua error: Internal error: The interpreter exited with status 1.
a Lua error: Internal error: The interpreter exited with status 1.
l Lua error: Internal error: The interpreter exited with status 1.
kq Lua error: Internal error: The interpreter exited with status 1.
q Lua error: Internal error: The interpreter exited with status 1.
ql Lua error: Internal error: The interpreter exited with status 1.
Dashed hrzntl dot vrtcl:
kr2 Lua error: Internal error: The interpreter exited with status 1.
r2 Lua error: Internal error: The interpreter exited with status 1.
rl2 Lua error: Internal error: The interpreter exited with status 1.
k2 Lua error: Internal error: The interpreter exited with status 1.
a2 Lua error: Internal error: The interpreter exited with status 1.
l2 Lua error: Internal error: The interpreter exited with status 1.
kq2 Lua error: Internal error: The interpreter exited with status 1.
q2 Lua error: Internal error: The interpreter exited with status 1.
ql2 Lua error: Internal error: The interpreter exited with status 1.
Dots hrzntl solid vrtcl:
om Lua error: Internal error: The interpreter exited with status 1.
m Lua error: Internal error: The interpreter exited with status 1.
mp Lua error: Internal error: The interpreter exited with status 1.
o Lua error: Internal error: The interpreter exited with status 1.
b Lua error: Internal error: The interpreter exited with status 1.
p Lua error: Internal error: The interpreter exited with status 1.
on Lua error: Internal error: The interpreter exited with status 1.
n Lua error: Internal error: The interpreter exited with status 1.
np Lua error: Internal error: The interpreter exited with status 1.
Dots hrzntl dashes vrtcl:
om2 Lua error: Internal error: The interpreter exited with status 1.
m2 Lua error: Internal error: The interpreter exited with status 1.
mp2 Lua error: Internal error: The interpreter exited with status 1.
o2 Lua error: Internal error: The interpreter exited with status 1.
b2 Lua error: Internal error: The interpreter exited with status 1.
p2 Lua error: Internal error: The interpreter exited with status 1.
on2 Lua error: Internal error: The interpreter exited with status 1.
n2 Lua error: Internal error: The interpreter exited with status 1.
np2 Lua error: Internal error: The interpreter exited with status 1.
Miscellaneous (grey background not available in, or changed from, familytree):
k3 Lua error: Internal error: The interpreter exited with status 1.
T2 Lua error: Internal error: The interpreter exited with status 1.
l3 Lua error: Internal error: The interpreter exited with status 1.
l4 Lua error: Internal error: The interpreter exited with status 1.
G2 Lua error: Internal error: The interpreter exited with status 1.
b3 Lua error: Internal error: The interpreter exited with status 1.
E Lua error: Internal error: The interpreter exited with status 1.
K Lua error: Internal error: The interpreter exited with status 1.
U Lua error: Internal error: The interpreter exited with status 1.
X Lua error: Internal error: The interpreter exited with status 1.
X2 Lua error: Internal error: The interpreter exited with status 1.

Style attributes

The appearance of the boxes in a row may be controlled by the following optional template parameters:

  • border specifies the width of the box border in pixels,
  • boxstyle can be used to append arbitrary CSS declarations directly to the box style attributes. For example, the following code:

<syntaxhighlight lang="wikitext">

Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.

</syntaxhighlight>

produces this chart:

Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.

Style attributes can even be set for individual boxes within each row, as in the example below:

<syntaxhighlight lang="wikitext">

Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.

</syntaxhighlight>

which produces this:

Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.Lua error: Internal error: The interpreter exited with status 1.

red-outlined triangle containing exclamation point 'Note:' When specifying style attributes for individual named boxes, make sure the box names are aligned to the left side of the area reserved for them in the template call (as in "|RED  |" instead of "| RED |" in the example above), otherwise the template will end up looking for a style parameter with spaces in its name.

The {{Tree chart/start}} template also accepts an optional |style= parameter that can be used to set CSS styles for the entire diagram, and an optional |align= parameter to set the chart alignment.

See also