# வார்ப்புரு:Chart/doc

<includeonly></includeonly>  
<noinclude></noinclude>  

This is a template for rendering simple diagrams consisting of boxes and connecting lines based loosely on an ASCII art-like syntax. The trees are displayed as HTML tables using CSS attributes, and may contain arbitrary wiki markup within the boxes. This implementation was based on the template.  

## Example usage
This code:  
<pre></pre>  
Produces this:  

## Parameters
This template produces one row in a family tree table. The template accepts up to 50 unnamed parameters describing the contents of the table. Each parameter specifies a **tile** or a **box**.  

- **Tiles** are line drawing symbols consisting of horizontal and vertical lines and various corners and crossings thereof. Tiles are specified using one- or two-character symbols: for the most common tiles, that character is more or less approximate the shape of the tile in 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:'''**

| <big><tt>,</tt></big> | &nbsp; | <big><tt>.</tt></big> | &nbsp; | <big><tt>`</tt></big> | &nbsp; | <big><tt>'</tt></big> | &nbsp; |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| <big><tt>^</tt></big> | &nbsp; | <big><tt>v</tt></big> | &nbsp; | <big><tt>(</tt></big> | &nbsp; | <big><tt>)</tt></big> | &nbsp; |  |
| <big><tt>-</tt></big> | &nbsp; | <big><tt>!</tt></big> | &nbsp; | <big><tt>+</tt></big> | &nbsp; | <big><tt> </tt></big> | &nbsp; | } |
**'''Dashed lines:'''**

| <big><tt>F</tt></big> | &nbsp; | <big><tt>7</tt></big> | &nbsp; | <big><tt>L</tt></big> | &nbsp; | <big><tt>J</tt></big> | &nbsp; |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| <big><tt>A</tt></big> | &nbsp; | <big><tt>V</tt></big> | &nbsp; | <big><tt>C</tt></big> | &nbsp; | <big><tt>D</tt></big> | &nbsp; |  |
| <big><tt>~</tt></big> | &nbsp; | <big><tt>:</tt></big> | &nbsp; | <big><tt>%</tt></big> | &nbsp; | <big><tt> </tt></big> | &nbsp; | } |
**'''Dotted lines:'''**

| <big><tt>S</tt></big> | &nbsp; | <big><tt>T</tt></big> | &nbsp; | <big><tt>Y</tt></big> | &nbsp; | <big><tt>Z</tt></big> | &nbsp; |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| <big><tt>W</tt></big> | &nbsp; | <big><tt>M</tt></big> | &nbsp; | <big><tt>G</tt></big> | &nbsp; | <big><tt>H</tt></big> | &nbsp; |  |
| <big><tt>P</tt></big> | &nbsp; | <big><tt>Q</tt></big> | &nbsp; | <big><tt>R</tt></big> | &nbsp; | <big><tt> </tt></big> | &nbsp; | } |
<br clear="" />  

**'''Mixed:'''**

| <big><tt>*</tt></big> | &nbsp; | <big><tt>d</tt></big> | &nbsp; | <big><tt>c</tt></big> | &nbsp; | &nbsp; | &nbsp; | &nbsp; | <big><tt>a</tt></big> | &nbsp; | <big><tt>k</tt></big> | &nbsp; | <big><tt>l</tt></big> | &nbsp; | &nbsp; | &nbsp; | &nbsp; | <big><tt>a2</tt></big> | &nbsp; | <big><tt>k2</tt></big> | &nbsp; | <big><tt>l2</tt></big> | &nbsp; |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| <big><tt>t</tt></big> | &nbsp; | <big><tt>y</tt></big> | &nbsp; | <big><tt>h</tt></big> | &nbsp; | &nbsp; | &nbsp; | &nbsp; | <big><tt>b</tt></big> | &nbsp; | <big><tt>m</tt></big> | &nbsp; | <big><tt>n</tt></big> | &nbsp; | &nbsp; | &nbsp; | &nbsp; | <big><tt>b2</tt></big> | &nbsp; | <big><tt>m2</tt></big> | &nbsp; | <big><tt>n2</tt></big> | &nbsp; |  |
| <big><tt>f</tt></big> | &nbsp; | <big><tt>e</tt></big> | &nbsp; | <big><tt>i</tt></big> | &nbsp; | <big><tt>j</tt></big> | &nbsp; | <big><tt>o</tt></big> | &nbsp; | <big><tt>p</tt></big> | &nbsp; | <big><tt>q</tt></big> | &nbsp; | <big><tt>r</tt></big> | &nbsp; | <big><tt>o2</tt></big> | &nbsp; | <big><tt>p2</tt></big> | &nbsp; | <big><tt>q2</tt></big> | &nbsp; | <big><tt>r2</tt></big> | &nbsp; | } |
<br clear="" />  

- **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 two pixels wide. Boxes can have any name that is a valid template parameter name, subject to a minimum of two alphabetical characters.

## Style attributes
The appearance of the boxes may be controlled by the following optional template parameters:  
- ** specifies the width of the box in pixels,
- *boxstyle* can be used to append arbitrary CSS declarations directly to the box style attributes.
For example, the following code:  

<pre></pre>  

produces this chart:  

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

<pre></pre>  

which produces this:  

**NOTE:** When specifying style attributes for individual named boxes, make sure the box names are aligned to the **** side of the area reserved for them in the template call (as in "<code>|RED&nbsp;&nbsp;|</code>" instead of "<code>|&nbsp;RED&nbsp;|</code>" in the example above), otherwise the template will end up looking for a style parameter with spaces in its name.  

The template also accepts an optional *style* parameter that can be used to set CSS styles for the entire diagram.  

## Migration from familytree
The template is largely compatible with the earlier template. However, to use the additional functionality offered with this template, diagrams must be updated to use instead. Many diagrams can be altered to use and its sub-templates simply by replacing the wikitext <tt>familytree</tt> with <tt>chart</tt>. A few of the "mixed" tiles had to be renamed, and diagrams using these tiles will have to make a few changes. Additionally, two new "mixed" tiles have been added, joining solid lines to dashed lines. The following table summarises the differences:  
| <tt>{</tt> | <tt>c</tt> |  |
| --- | --- | --- |
| <tt>}</tt> | <tt>d</tt> |  |
| <tt>#</tt> | <tt>t</tt> |  |
| <tt>[</tt> | <tt>e</tt> |  |
| <tt>]</tt> | <tt>f</tt> |  |
| &nbsp; | <tt>i</tt> |  |
| &nbsp; | <tt>j</tt> | } |

Lastly, if any uses of the template end with <tt>|}}</tt>, that vertical bar should be removed, leaving the last cell in that row containing either some text or a space.  

## Errors
- :Template:Chart/cellb will be caused by any instance of <code>|}}</code> change this to <code> }}</code>

- :Template:Chart/celltTemplate:Chart/cellb will be caused by any instance of <code>||</code> change this to <code>| |</code>

<includeonly>  

</includeonly>