Template talk:Tree chart
Julio-Claudian family tree
To use this at Julio-Claudian family tree, I would need a dotted, dashed intersect tile for Augustus' adoption of Lucius and Gaius or else face a really convoluted adoption line. Such a problematic family tree. — Laura Scudder ☎ 00:07, 11 February 2008 (UTC)
- I can see what you mean: you have a monster tree there! I'll see what I can do about other mixed tiles without making it too complicated. TimR (talk) 17:13, 11 February 2008 (UTC)
- OK, see what you can do with these:
- I don't know if it's my browser (IE7), but those doesn't look right. The line on the left of the middle is dotted where it should be dashed while the one on the right is dashed and vice versa. --MrStalker (talk) 13:54, 25 February 2008 (UTC)
- Yes, weird. I see the same thing with IE7, but it's fine with Firefox. I'll look into it. Thanks. TimR (talk) 14:41, 25 February 2008 (UTC)
- OK, nailed it. It seems to be a pretty stupid IE7 bug. If you give it this code:
<table> <tr> <td style="border-bottom: 1px dashed black; border-right: 1px dotted black;"> Cell content </td> </tr> </table>
- then both borders come out dotted. But if you change either of the colours, it's OK. I've fixed it by altering the colours of the buggy squares slightly to include #000001, which is different enough from black to escape the bug, but close enough to black not to notice. TimR (talk) 15:13, 25 February 2008 (UTC)
- Thanks! I think it's a big improvement for clarity. Now I just have to figure out if there's any good way to hook Claudius Marcellus up to his parents on the other side of the tree. Although, in my dreams there would be a series that had parallel lines on one side (so you could have multiple connections going into one side of a box rather than intersecting before the box) but that would be a lot of tiles. — Laura Scudder ☎ 18:06, 25 February 2008 (UTC)
Expert chart maker needed
Every time I try to use this, it hardly ever turns out right. The connecting lines are never in the center of the tops or bottoms of the boxes. Could someone please contact me here or on my talk page about creating a chart for me that actually looks good. What I am trying to chart out is here. If anyone can help me, it would be appreciated. I have no clue what the differences are between the solid, dotted, or dashed lines mean. - LA @ 08:33, 24 February 2008 (UTC)
- OK, I've had a look at your page, and I think that I can see what you're trying to do. If I'm right, then using a {{chart}} probably isn't the easiest way to go: charts tend to be good if you want a whole load of boxes of a more-or-less standard size, and with lines connecting them. Perhaps you're better off with something in the form of a table, like this:
- That still may not be quite what you want, if I've not understood what you're after. And feel free to change the colours to match your preferences. :-) TimR (talk) 12:16, 24 February 2008 (UTC)
- What I am trying to show is "parentage." For example, the film Destroy All Monsters is considered a sequel to Varan the Unbelievable, Son of Godzilla, and Atragon. That would make those three films the "parents" of Destroy All Monsters. I would like to be able to clean up the film series lists, so if I can get a grip on this, I could weed the lists of series that are artificially created. - LA @ 21:12, 24 February 2008 (UTC)
Accessibility
I've raised my concerns about the accessibility of this template. Please comment, and help to improve it. Andy Mabbett | Talk to Andy Mabbett 19:43, 27 August 2008 (UTC)
Importing Chart into another wiki?
Anyone know how to import Chart into another wiki?
I've tried export/import, but only succeed in generating a page that looks partially parsed:-
If I hit edit to see the templates actually being used, there's only 2 listed instead of the ~150 that I expect:-
Templates used on this page:
|
Any ideas where I'm going wrong? —Preceding unsigned comment added by Bradley Milton (talk • contribs) 16:53, 6 October 2008 (UTC)
- Check your import log to see what you actually got. On my last three attempts to import pages from here to another wiki, I did not get all. Latest involved about 90 pages, of which the import log records just six. Maybe someone can help me and Bradley Milton? Robin Patterson (talk) 08:01, 27 November 2008 (UTC)
- I found I needed the ParserFunctions extension installed in my wiki in order to get the Chart template and its dependent templates (which I'd imported from wikipedia) to work. --Dennis J au (talk) 16:30, 1 August 2010 (UTC)
- Hmm, tried importing this template and the dependent templates into a wikia wiki, which should have parser functions installed, but it isn't working for some reason. Is there anyone who has done a similar thing before and can help me out?109.123.31.174 (talk) 10:35, 28 May 2011 (UTC)
- Nevermind, it works.. 109.123.31.174 (talk) 17:44, 28 May 2011 (UTC)
Checking for a single character with ParserFunctions
#ifeq:{{padright:{{{1}}}|2|?}}|{{{1}}}?
Would be shorter and probably easier to follow. --Scandum (talk) 06:40, 26 January 2009 (UTC)
Font size
I am working on Gilbert du Motier, marquis de Lafayette and Adrienne de La Fayette Family Tree, which uses this template/function. I am interested to learn if there is a global setting for decreasing the font size? Ohconfucius (talk) 07:49, 4 February 2009 (UTC)
- Scratch that. I found the answer: {{chart/start|style=font-size:85%;line-height:100%;}} Ohconfucius (talk) 08:28, 4 February 2009 (UTC)
This template makes some nice-looking charts. But when I tried to generate a PDF from an article with a chart, the result was downright awful. I wonder if that can be improved in the template, or whether it's a general flaw of tables. --SlothMcCarty (talk) 10:24, 28 March 2009 (UTC)
Problem with Chart on my First Article.
![](http://upload.wikimedia.org/wikipedia/en/thumb/f/fb/Yes_check.svg/20px-Yes_check.svg.png)
Dear Wikipedians,
I'm Very new to Wikipedia.
This is my First Wikipedia Article.
It's my long time desire to write a Quality Article for Wikipedia.
I have spend many days in learning & understanding codes & rules of Wiki'P before posting my article. Few of our fellow wikipedian (Chevy),ɳorɑfʈ Talk!, Slon02 has reviewed my article & helped me to improve my article.
I tried Chart in my article.
Almost everything is working fine , but at the top of the chart i'm getting a kind of error mesg "Template:Chart/celltTemplate:Chart/celltTemplate:Chart/cellbTemplate:Chart/cellbTemplate:Chart/celltTemplate:Chart/cellbTemplate:Chart/celltTemplate:Chart/celltTemplate:Chart/cellbTemplate:Chart/cellb".
please review my article & provide your 'valuable feedback'.'Pls help me..' Raj6644 (talk) 09:05, 2 July 2010 (UTC)
- Seems to have been resolved; current version now restored to fix offsetting workaround. --xensyriaT 20:54, 5 April 2013 (UTC)
Migration from Familytree problem
Hi, please take a look at this diagram User:Sameboat/sandbox#2, it generates 2 unneeded templates Template:Chart/cellt and Template:Chart/cellb. I've already followed everything in the Migration from familytree section but still encounter this problem and cannot figure out how it happens. In addition, the diagram can be shown in English Wikipedia using Familytree (User:星光下的人/test) but not in Chinese Wikipedia, even I've already updated the syntax to be on par with EN version. I wonder if MediaWiki rations preprocessor node count differently between Wiki projects. -- Sameboat - 同舟 (talk) 14:03, 7 February 2011 (UTC)
- See Template:Chart#Errors, that should help you fix the issue that I think you're referring to. ~ InferKNOX (talk) 15:33, 3 January 2014 (UTC)
How to add a "footer" row at bottom for footnotes?
![](http://upload.wikimedia.org/wikipedia/en/thumb/f/fb/Yes_check.svg/20px-Yes_check.svg.png)
I would like to add a single row at the bottom of the chart where I can right align a few footnotes. How can I do that? The general problem I am trying to solve is that some trees (like Template:Kim Jong-il family) are too big to give the whole family. The chart should note that it is selectively incomplete. Either a comment at the bottom to that affect or footnote markers to mark missing missing/spouses would be good. Jason Quinn (talk) 14:38, 15 December 2012 (UTC)
- I accomplished this through the usual "Reflist" methods. See Template:Kim Jong-il family for an example. Jason Quinn (talk) 18:46, 5 March 2013 (UTC)
Rendering issues
Is it just me, or do a lot of the lines not quite connect? The solid top left corner (",") always seems to be missing a pixel in the corner, and the top right (".") intermittently (e.g. sometimes in preview mode) has the pixel below that corner missing as do the "T"s ("v"), both with {{Chart}} and {{Family tree}}. I'm using Windows 7, but have tried it in Chrome 26, Firefox 19 & 20 and Explorer 10; all display it the same way, which makes the whole thing look badly drawn and inconsistent. --xensyriaT 20:04, 5 April 2013 (UTC)
Assistance required
I have translated the Spanish entry for Fabaceae into English but the family tree template has been updated since the Spanish article was first published and I have not the least idea how to use the new chart template. Can anyone update the following to get a family tree. The following gets the lines in place but none of the labels or boxes appear. Thanks — Preceding unsigned comment added by English Fig (talk • contribs) 17:13, 18 November 2013 (UTC)
Surianaceae | |||||||||||||||||||||||||||||
Faboideae | |||||||||||||||||||||||||||||
Polygalaceae | |||||||||||||||||||||||||||||
Surianaceae | |||||||||||||||||||||||||||||
Fabales | |||||||||||||||||||||||||||||
Quillajaceae | |||||||||||||||||||||||||||||
Tribe Cercideae, Detarieae and the genus Duparquetia | |||||||||||||||||||||||||||||
Fabaceae | |||||||||||||||||||||||||||||
Caesalpinioideae | |||||||||||||||||||||||||||||
Mimosoideae | |||||||||||||||||||||||||||||
Faboideae | |||||||||||||||||||||||||||||
Fixed. These are quite arcane templates, and there seemed to be two problems: the first was using single-letter label names (e.g. A, B, C), some of which are used to make dashed/dotted lines; the second was that there were some empty parameters (
||
), which added more of those redlinks above the chart. ‑‑xensyriaT 23:48, 18 November 2013 (UTC)
Family trees of the ancient Chinese kings
Trying to get started over there. Family tree works fine but, being the nice guy I am, I was trying to respect the desire to migrate to using {{chart}}. Could someone please explain what the problem with the syntax below is, that is causing this thing to not even be able to display simple lines?
The kings of [[Qin (state)|Qin]] claimed descent from "the granddaughter" of "a remote descendant" of the Emperor [[Zhuanxu]], the grandson of the [[Yellow Emperor]].<ref>[[Sima Qian]]. ''[[Records of the Grand Historian]]'' translated by Nienhauser, William Jr. ''The Grand Scribe's Records: The Basic Annals of Pre-Han China'', [http://books.google.com.hk/books?id=qDo3xBcsX-UC&pg=PA87 pp. 87 ff]. Indiana University Press, 1994. Accessed 4 December 2013.</ref>
{{chart/start}} {{chart| | | | | | | | | | | | | | }} {{chart| | | | | | | | | | | | NX | v | BB | NX='''[[Nüxiu]]'''<br>{{lang|zh|女脩}}</br>Lady Xiu | BB = A bird{{refn|Called a black bird in Nienhauser but a swallow in Lao Kan.}}}} {{chart| | | | | | | | | | | | | ! | }} {{chart| | | | | | | | | | | | | DY | DY='''[[Daye]]'''<br>{{lang|zh|大業}}</br>Ye the Great}} {{chart/end}}
Nüxiu 女脩 Lady Xiu | A bird | ||||||||||||||||||||||||||||||||||
Daye 大業 Ye the Great | |||||||||||||||||||||||||||||||||||
I've got the newest Chrome but, if you can't see it, this thing is just making boxes with no lines and then giving me the error messages "Template:Chart/cell v tTemplate:Chart/cell v bTemplate:Chart/cell ! tTemplate:Chart/cell ! b". — LlywelynII 07:37, 6 December 2013 (UTC)
- Again, this can be a very temperamental template. Unlike most other templates, whitespace is crucial; in this case "v" and "!" had spaces around them, causing the template to look for the wrong subpage to transclude from (i.e. " ! " is different from "!", and currently doesn't exist). The exception is for the cell contents; here, in order to make the code readable, the convention is to use three letter codes with spaces either side; this makes them match three one character space/line cells, so you can easily see where to put the connectors when making a chart: see in the code below how "!" aligns with the middle of "DYE" below, and "v" above. Also, to keep cells on the far right from squashing (like "A bird" above), you have to extend the table on at least one line to go as far right as the furthest right cell; in this case I added three spaces after "!" on the middle line. ‑‑xensyriaT 09:56, 6 December 2013 (UTC)
{{chart/start}}
{{chart| | | | | | | | | | | | NXU |v| BBD | NXU='''[[Nüxiu]]'''<br>{{lang|zh|女脩}}</br>Lady Xiu | BBD = A bird}}
{{chart| | | | | | | | | | | | | | |!| | | }}
{{chart| | | | | | | | | | | | | | DYE | DYE='''[[Daye]]'''<br>{{lang|zh|大業}}</br>Ye the Great}}
{{chart/end}}
Nüxiu 女脩 Lady Xiu | A bird | ||||||||||||||||||||||||||||||||||
Daye 大業 Ye the Great | |||||||||||||||||||||||||||||||||||
- Well, I could hope for a less tempermental template, but with such quick and helpful replies it almost doesn't matter. Thanks! =) — LlywelynII 14:01, 6 December 2013 (UTC)
Portraits in background
Is it possible to add an image to the background of a node to act as a portrait? If so, is there a way to also sort of...fade or make it less visible/opaque, so that overlying text can be clearly read? I would really be great if so, as I'd like to add it to some trees I made, starting with: Template:T'ai chi ch'uan lineage tree. Thanks. ~ InferKNOX (talk) 15:38, 3 January 2014 (UTC)
- Should be possible in theory. I'd try to work out how to add images in the way you want to table cells; once you've done that, add it as an option to each line of the code similarly to
{{{boxstyle_}}}
. Make sure though that you use the Template:Chart/sandbox until you've tested that it's stable (i.e. works won't mess up any existing charts), and also that you keep the style fitting as closely with the rest of Wikipedia and as encyclopedic as possible. ‑‑xensyriaT 22:36, 3 January 2014 (UTC)
Lone boxes collapsing
Boxes without some sort of line next to them collapse, causing problems such as in https://en.wikipedia.org/wiki/Roosevelt_family#Family_tree Vertical lines (solid, dashed) are not being treated as real connective elements, so this affects any parent or child elements only touched by straight lines. Adding any line except vertical next to an element causes the box to form correctly, but I can find no symbol that would make sense next to these lone boxes.--Martin Berka (talk) 17:40, 10 January 2014 (UTC)
- Not completely sure what you mean by collapse. Has this revision improved the Roosevelt example? If so, make sure that at least one other line extends to as far out as the furthest point of the box with spaces. For example:
{{chart/start}}
{{chart| | | EX1 |EX1=a}}
{{chart| |,|-|^|-|.}}
{{chart| EX2 | | EX3 |EX2=b|EX3=c}}
{{chart/end}}
- Gives:
a | |||||||||||||
b | c | ||||||||||||
- But just by adding a space to the end of the middle line like so:
{{chart/start}}
{{chart| | | EX1 |EX1=a}}
{{chart| |,|-|^|-|.| }}
{{chart| EX2 | | EX3 |EX2=b|EX3=c}}
{{chart/end}}
- The columns are extended all the way to where we want Example 3 to end, hopefully preventing it from squashing:
a | |||||||||||||
b | c | ||||||||||||
- For a more extreme example of this, see "a bird" above. ‑‑xensyriaT 22:42, 10 January 2014 (UTC)
- I don't see this in Firefox 26 or IE11. -- Gadget850 talk 20:00, 11 January 2014 (UTC)
- This should be system independent, based on the ways tables are displayed. I've changed the example text to make it more pronounced: "c" should display as much smaller than "a" and "b" in the first example, and incorrectly aligned relative to the connector, but not the second example. This seems to be because {{chart}} uses tables, with connector and space "tiles" as fixed width cells (2em), and content "boxes" as three cells of width relative to their text. If there are fixed width tiles above or below a box, it guarantees a minimum width (of 6em, three times the fixed "tile" width), and in practice, when connectors are used, all content boxes except the ones on the far right will have this minimum, so space tiles should be added above or below to the furthest extent of the cell on the right to stop the furthest right from being smaller. Another way might be to add something to the code to make "boxes" have a minimum (but not fixed) width of 6em; not sure if there's a simple way to do this though. Then again I'm not completely sure this is what Martin Berka is talking about. ‑‑xensyriaT 01:35, 12 January 2014 (UTC)
- Sorry, I assumed everyone could see it. The problem is vertical collapse, not horizontal. Every affected box, including every box in your last comment, looks like a black, horizontal bar to me (Chrome). The Roosevelts loook flat too, though some bars are now thicker than others.--Martin Berka (talk) 13:29, 23 January 2014 (UTC)
- Do you have any of the Preferences → Beta features enabled? How does it look if you log out? -- Gadget850 talk 13:33, 23 January 2014 (UTC)
- Ah wait, I see what you mean now; it's a problem with the latest version of Chrome, and should work with other browsers. Hopefully if enough people report they're having problems with it Google will get around to fixing it. ‑‑xensyriaT 19:09, 23 January 2014 (UTC)
- Removing the 'cellpadding="0"' from {{Chart/start}} seems to fix the issue for Chrome. It doesn't seem to serve any useful purpose, since it will only influence the padding of text inside boxes, which probably should use the default padding of 1 anyway. --130.83.160.133 (talk) 12:24, 29 January 2014 (UTC)
- Sorry, I assumed everyone could see it. The problem is vertical collapse, not horizontal. Every affected box, including every box in your last comment, looks like a black, horizontal bar to me (Chrome). The Roosevelts loook flat too, though some bars are now thicker than others.--Martin Berka (talk) 13:29, 23 January 2014 (UTC)
- This should be system independent, based on the ways tables are displayed. I've changed the example text to make it more pronounced: "c" should display as much smaller than "a" and "b" in the first example, and incorrectly aligned relative to the connector, but not the second example. This seems to be because {{chart}} uses tables, with connector and space "tiles" as fixed width cells (2em), and content "boxes" as three cells of width relative to their text. If there are fixed width tiles above or below a box, it guarantees a minimum width (of 6em, three times the fixed "tile" width), and in practice, when connectors are used, all content boxes except the ones on the far right will have this minimum, so space tiles should be added above or below to the furthest extent of the cell on the right to stop the furthest right from being smaller. Another way might be to add something to the code to make "boxes" have a minimum (but not fixed) width of 6em; not sure if there's a simple way to do this though. Then again I'm not completely sure this is what Martin Berka is talking about. ‑‑xensyriaT 01:35, 12 January 2014 (UTC)
- I don't see this in Firefox 26 or IE11. -- Gadget850 talk 20:00, 11 January 2014 (UTC)
There is clearly an on-going problem. On Nicomachean Ethics an IP editor has been trying to fix this problem by adding spaces, and things like this will continue to happen if there is no fix. This tree looked fine for a long time. I also see collapsed boxes there, and also even on the template page examples, and on examples on this page. (I use Chrome.)--Andrew Lancaster (talk) 10:40, 18 February 2014 (UTC)
- Let's try the IP editor's fix above. ‑‑xensyriaT 16:44, 18 February 2014 (UTC)
- Which fix? Just to confirm, I see collapsed boxes all over this talk page.--Andrew Lancaster (talk) 13:45, 20 February 2014 (UTC)
- Removing 'cellpadding="0"' from {{Chart/start}}. I've made the change in the template's sandbox: see the Template:Chart/start/testcases for the difference. ‑‑xensyriaT 17:26, 20 February 2014 (UTC)
- It will fix {{Chart}} for Chrome users at the cost of making all existing charts slightly larger; thinking more about it we could raise it at the technical Village pump or add a RfC to get more input before going ahead. ‑‑xensyriaT 17:48, 20 February 2014 (UTC)
- It is also obsolete HTML. We should change:
- Which fix? Just to confirm, I see collapsed boxes all over this talk page.--Andrew Lancaster (talk) 13:45, 20 February 2014 (UTC)
<table cellspacing="0" cellpadding="0" border="0" style="{{{style|}}}">
- To:
<table style="border:0 padding: 0px; border-spacing: 0px; border-collapse: separate; {{{style|}}}">
- Probably some other places to update this as well. -- Gadget850 talk 19:06, 20 February 2014 (UTC)
- Thanks; sandbox (and testcases) updated accordingly. For some reason, even with
padding: 0px;
the boxes are bigger than they were before. ‑‑xensyriaT 22:34, 20 February 2014 (UTC)
- Thanks; sandbox (and testcases) updated accordingly. For some reason, even with
- Probably some other places to update this as well. -- Gadget850 talk 19:06, 20 February 2014 (UTC)
Tried the above fix at another wiki and it did not help. Finally figured out the problem. Seems the editors have been using the template in way Chrome doesn't like, as you can see in a number of cases above on this talk page. Chrome wants to see table rows of equal numbers of cells, or you get the collapsed rows (both content box rows and border only rows). What I found worked was to make certain that all table rows have the exact same number of cells. Example below:
- Example of incorrectly rendering template from talk page further up
{{chart/start}} {{chart| | | EX1 |EX1=a}} {{chart| |,|-|^|-|.| }} {{chart| EX2 | | EX3 |EX2=b|EX3=c}} {{chart/end}}
a | |||||||||||||
b | c | ||||||||||||
- Example of the same template that will render correctly
{{chart/start}} {{chart| | | EX1 | | |EX1=a}} {{chart| |,|-|^|-|.| | }} {{chart| EX2 | | EX3 |EX2=b|EX3=c}} {{chart/end}}
a bc
We have hundreds of these templates in use on our wiki and the fix is working well. Hope this helps.108.74.21.38 (talk) 02:32, 1 March 2014 (UTC)