Changes

Jump to: navigation, search

Howto: Make a relationship chart

381 bytes added, 00:12, 3 February 2016
add link to example.gramps
{{languages|Howto: Make a relationship chart}}
{{out of date}}This is a Howto on how How to make a relationship chart (can be for either ancestors, descendants, ...) with Gramps 2.24.x. and the [[Gramps_4.1_Wiki_Manual_-_Reports_-_part_5#Relationship_Graph|Relationship plugingraph report]].[[Image:RelationshipChartDescendants.png|right|thumb|300px|An example chart]]
== Before you start == The Relationship graph report is made with uses the graphviz GraphViz backend, so which should already be installed, if not you will need to install [http://graphviz.org graphviz] (on linux, use your package manager).
== Before you start ==
Gramps can produce charts, but to view them, you need other programs. We recommend that you install the following:
* [http://graphviz.org Graphviz]: '''required''' for the creation of the relationship charts
* [http://www.inkscape.org/ Inkscape]: for viewing and editing svg charts, export to png
* [http://www.gnu.org/software/gv/ gv], [http://linuxappfinder.com/package/kghostview kghostview]: for viewing ps charts
== Example 1-A: a descendant chart ==
[[ImageFile:RelationshipChartDescendants.png|right|thumb|200px220px|A descendant chart, click for details]]Download Use the [[example.gramps]] that came with your install, or download [httphttps://svn.coderaw.sfgithubusercontent.netcom/pgramps-project/gramps/codemaintenance/trunkgramps41/example/gramps/ example.gramps example.gramps], on this page use the {{man label|Download}} linksave to a file, create a new database in Gramps called example, and import the example.gramps data into it.
If not the case, set the active person to ''Garnervon Zieliński, Lewis AndersonSr''.
To make a descendant chart with the relationship report, choose the menu item
{{man menu|Reports -> Graphical reports Graphs -> Relationship graphGraph...}}
In the Bottom dialog, set the format to .png and chose the following in the tabs available:#* '''Paper Document Options '''-> Size : Custom Size (Set width and height to 10000 cm, or some other large value)#set the '''Report Options Output Format'''-> Filter: Descendants of Garner, Lewis Andersson #'''Layout optons '''-> Aspect ratio: minimal sizeto .png
(I sometimes experience problems setting Chose the sizes following in the tabs available:#'''Paper options dialog. A workaround is Options '''-> Size : Custom Size (Set width and height to use the example using graphviz code in example 3 below.''10000'' cm, or some other large value)#'''Report Options '''-> ''Filter:'' '''Descendants of Garner von Zieliński, Lewis Anderson Sr''' #'''GraphViz Layout'''-> ''Graph Direction:'' '''Horizontal (<-)'''#'''GraphViz Options'''-> ''Aspect ratio:'' '''Compress to minimal size'''
The result (using gramps 2.2.7) can be seen Select '''OK''' to generate the right. You can use print this on a dedicated printer (check dpi of png!), or you can use this image on a website to share. In the last case, you can use the trick explained in [[Make flash plugin from a png]], to make the resulting graph easier to navigatechart.
The result can be seen to the right. You can use print this on a dedicated printer (If required change the '''GraphViz Options''' DPI of png file.), or if you use the default DPI of 72 you can use this image on a website to share. In the last example below, you can use the tip explained in [[Make flash plugin from a png]], to make the resulting graph easier to navigate. In the chart image you see , males in are blue, females in are pink and the yellow balloons indicate a family node in which a marriage date is printed (if known). You can select not to see this family node by deselecting in the '''Graphviz OptionsGraph Style''' tab the option ''Show family nodes''.
== Example 1-B: a chart with ancestors ==
[[Image:RelationshipChartAncestors_small.png|left|thumb|350px|Fig. An ancestor chart. For the detailed image, [[Media:RelationshipChartAncestors.png| click here (853kb!)]]]]   Download and open the example.gramps file as in Example 1 -A
Set ''Warner, Carl Thomas'' to be the active person.
Repeat the process in Example 1-aA, but choose the filter ''Ancestors of Warner, Carl Thomas'' this time.  You can see the result to the left.
[[File:RelationshipChartAncestors small.png|right|thumb|300px|Example Relationship ancestor chart. (For the detailed image, [[Media:RelationshipChartAncestors.png| click here (1.49mb!))]]]]
You can see the result to the right.
This is already an extremely large graph.
 
 
 
 
It can only be readily viewed in a good image viewer.
For printing you need to resort to printing on several pages, or you need access to a large plotter.
{{-}}
== Example 2: A chart with ancestors, descendants and their families ==
[[Image:RelationshipChartAncestorsAndDescendants_small.png{{out of date|rightexample 2 & 3 and section below them still need a bit of an update }}{{man note|thumb|450px|Fig. A large chart. For the detailed image, [[MediaNote:RelationshipChartAncestorsAndDescendants.png| click here (363kb!)]]]] Note: This example uses filters. See [[Example filters| Examples of filters]] for an introductory example.}}   <!-- Can not find Cristiansen, Frances in example.gramps -->
Open the file example.gramps and select Cristiansen, Frances as the active person.
* ''Ancestors of <person>'' choose Christiansen, Frances and check <tt>inclusive</tt>.
* ''Descendants of <person>'' chose Christiansen, Frances
 
 
 
Make sure that "At least one rule must be fulfilled" is chosen, so that we get both ancestors and descendants!
 
Now we create the filter we will actually use for the report. It will be based on the previous filter: Create a new filter, called '''Frances2'''. This filter should contain the rules:
* ''Siblings of filter'' Frances1
* ''Spouses of filter'' Frances1
 
 
 
Now close the filter editor, and follow the instructions given in Examples 1a and 1b, but this time choosing the filter '''Frances2''' in the '''Report Options''' tab.
   [[Image:RelationshipChartAncestorsAndDescendants_small.png|right|thumb|450px|Fig. A large chart. For the detailed image, [[Media:RelationshipChartAncestorsAndDescendants.png| click here (363kb!)]]]]
The result is visible to the right (363kb, large file !)
{{-}}
== Example 3, : Generating the graph by using the Graphviz command line tool ==
{{man tip|style="width:80%;margin-top:+.7em;margin-bottom:+.7em;background-color: #c0f0ff;border:1px solid #ccc; padding: 5px" align="center"|-|[[Image:Gnome-important.png]]Tips|<center style="font-size:100%">'''Note:''' The current stable version of Some tips around GraphViz are [http://graphvizbernaerts.dyndns.org Graphviz] (v2.12) has a bug. In order to correctly display the family nodes (yellow balloons), all occurrences of the word ''ellipse'' should be changed to ''egg'' (see [http:/linux/74-ubuntu/www.287-ubuntu-graphviz.org/bugs/b1078.html bug report 1078-viewer-gnome-thumbnailer available]).</center>|}}
In the menu, select {{man menu|Reports -> Graphs -> Relationship Graph...}}.
Select in file formatIn the Bottom dialog: graphviz * '''Document Options''' set the '''Output Format''' to ''Graphviz file'', which defaults to the gv extension. This fileis then a dot file which can be processed by graphvizGraphviz.
Eg, to make from the gv file a ps file, Gramps uses:
=== Manual changes ===
The Graphviz '''.gv''' dot file is a text file with a well explained documented structure, for extra info(See: [http://www.graphviz.org/Documentation.php www.graphviz.org/Documentation])
digraph GRAMPS_graph
bgcolor=white;
center="true";
charset="iso-8859-1utf8";
concentrate="false";
dpi="7572"; graph [fontsize=1214];  ....
then the actual Gramps data are shown:
I3493 I0585 [ shape="box" fillcolor="pink#e0e0ff" style="solid,filled" label="BlanckeKristensen, CharlotteJohn Francis\"Chick\"\n(18011889-10-10 - 1938-10-23)" ];...
You can optimize the layout by making changes in the file.
*For paper size: look for the "page" (paper size) and "size" (area of paper to use), and change these to '''some large values'''. This is important as otherwise the figure will be wrongly scaled giving bad and the picture quality will be poor (eg unreadable text).
*You can also change the font by adding a font family. Look for the lines
node [style=filled fontsize="12"];
dot -Tjpg -oreport.jpg report.dot -v
...
Activated plugin library: libgvplugin_pango.so.5
Using textlayout: textlayout:cairo
Using render: cairo:cairo
Using device: jpg:cairo:gd
...
== Printing large graphs ==
== Troubleshooting ==
*If you encounter bad fonts (missing characters) or wrong fontsizes, see [[Howto:_Make_a_relationship_chart#Example_3:_Generating_the_graph_by_using_the_Graphviz_command_line_tool|Example 3 ]] on how you can set the font yourself.*If you have a bad resolution of png, eg unreadable text, this is probably because you have set a paper size which is to small. See Exampe [[Howto:_Make_a_relationship_chart#Example_1-A:_a_descendant_chart|Example 1-A]]: set the papersize of number of pages to a high number, but select in '''Layout GraphViz Options''', in ''Aspect ratio'': <tt>automatically use optimal number pagesFill the given area</tt>, or use <tt>Compress to minimal size</tt>
{{man warn|Reports and custom IDs|After a GEDCOM import, your database can use some non-standard IDs (ie. 123I or 456U not set on {{man menu|Edit --> Preferences --> Identifiants IDFormats}}). If generated reports do not properly display data, then try [[Gramps_3Gramps_4.0_Wiki_Manual_1_Wiki_Manual_-_Tools#Reorder_GRAMPS_IDReorder_Gramps_ID|Reorder GRAMPS Gramps IDs tool]] ({{man menu|Tools-->Database Family Tree Processing-->Reorder GRAMPS Gramps IDs}}).}}
== Further cool Additional things to do try ==
* You can make descendant charts and add them to the media gallery of the person. Like that, the chart is available from the website.
* offer Offer a chart on your website as a [[Make flash plugin from a png |flash relationship graph]], enabling zooming, moving, ... over your data or just use SVG for Firefox and OperaChrome, see [http://www.gramps-project.org/wiki/index.php?title=UnsupportedPlugins#DenominoViso_-_HTML_Ancestors_page [DenominoViso]]
== Want to help developing ? Help improve the Graph reports ==If you go through examine the dot specifications, you will note that much more can be done with graphicsGraphViz output. If you have programming skills you can add some functionality:* more/better Improved text in the boxes: what text and how to organize it?* coloringColoring. See the [[Familylines pluginGramps_4.1_Wiki_Manual_-_Reports_-_part_5#Family_Lines_Graph|Family Lines Graph]]: for a color per family, for specific relations, for the central person, ...
== Link to the manual See also ==* Also check out the [[Gramps_3Gramps_4.4_Wiki_Manual_1_Wiki_Manual_-_Reports_Reports_-_part_5#Relationship_Graph |Relationship Graph - User Manual]].
[[Category:Tutorials|Make a relationship chart]]
22
edits

Navigation menu