This module provides an interactive SVG ancestor fan chart for the webtrees genealogy application. Click on any ancestor to re-center the chart on that person. Right-click to open a tooltip with detailed dates, places, and images.
Requires webtrees 2.2 and PHP 8.3 or later.
Important
Download the right .zip file. Each GitHub release page lists two kinds of archive:
- ✅
webtrees-fan-chart.zip— listed under Assets at the bottom of the release. This is the install-ready archive: it bundles the requiredvendor/dependencies (such aswebtrees-module-base). - ❌ "Source code (zip)" /
webtrees-fan-chart-<version>.zip— auto-generated by GitHub from the tag. This is the raw source without bundled dependencies. Uploading it tomodules_v4/will fail withTrait/Interface "MagicSunday\Webtrees\ModuleBase\…" not found(orModuleAssetUrlInterface not found).
Always pick the asset zip, never "Source code (zip)".
Important
If a previous version of this module is already installed: delete the entire modules_v4/webtrees-fan-chart folder before extracting the new ZIP. Extracting on top of an existing folder leaves stale files behind that can clash with the new release — a common cause of Interface … not found errors right after an update.
- Open the latest release page.
- Under Assets, download
webtrees-fan-chart.zip. - Upload the
.zipfile to your web server. - Unzip the package into your
modules_v4directory. - Rename the folder to
webtrees-fan-chart.
You should now see a modules_v4/webtrees-fan-chart directory containing the module files.
Run the following command from the root of your webtrees installation:
composer require magicsunday/webtrees-fan-chart --update-no-devThe module will automatically install into the modules_v4 directory.
To remove the module:
composer remove magicsunday/webtrees-fan-chart --update-no-devIf you are using the development version of webtrees (main branch):
composer require magicsunday/webtrees-fan-chart:dev-main --update-no-devClone the repository into your modules_v4 directory (a Code → Download ZIP of
the source works the same way):
git clone https://github.com/magicsunday/webtrees-fan-chart.git modules_v4/webtrees-fan-chartA source checkout contains the module code only — it does not include the
shared webtrees-module-base library, so on its own it fails with
Trait "MagicSunday\Webtrees\ModuleBase\…" not found. Supply that library in one
of two ways:
Way A — drop-in (no code change). Download
webtrees-module-base and
copy its src/ to the location this module's module.php already expects:
modules_v4/webtrees-fan-chart/vendor/magicsunday/webtrees-module-base/src/…
Way B — shared copy (one edit). Place webtrees-module-base next to this
module in modules_v4/ (rename the extracted folder to webtrees-module-base),
then point this module's module.php at it. A single shared copy then serves
every magicsunday module installed this way:
// modules_v4/webtrees-fan-chart/module.php
$loader->addPsr4(
'MagicSunday\\Webtrees\\ModuleBase\\',
__DIR__ . '/../webtrees-module-base/src'
);Important
Both ways are overwritten by every module update, so you must redo them after
each upgrade. For a maintenance-free install without Composer, use the
asset zip (it bundles all dependencies). Inside a
Composer-managed webtrees, prefer composer require magicsunday/webtrees-fan-chart:dev-main
— see Using Composer.
To update to the latest version:
- Manual installation: From the latest release Assets section, download
webtrees-fan-chart.zip(not "Source code (zip)"), delete the oldmodules_v4/webtrees-fan-chartfolder first, and extract the new one. Extracting on top of an existing folder leaves stale files behind that can clash with the new release (a common cause ofInterface … not founderrors after an update). - Composer: Run
composer update magicsunday/webtrees-fan-chart --update-no-dev. - Git: Run
git pullinside themodules_v4/webtrees-fan-chartdirectory, then re-apply your source step (see Using Git).
- Go to the Control Panel (admin section) of your webtrees installation.
- Scroll down to the Modules section and click on Charts (under Genealogy).
- Enable the Fan chart module. Optionally disable the built-in fan chart to avoid confusion.
- Click Save.
Open the Charts menu on any individual page and select Fan chart.
The form at the top lets you choose the starting person, fan size (180-360 degrees), and number of generations (2-10).
Click Show more options to access additional settings:
| Option | Description |
|---|---|
| Display mode | Choose between "Show names and images", "Show names only", or "Show images only". Images are only shown if the arc segment is wide enough. |
| Show descendants | Shows partners and children as arcs below the ancestor section. The fan size is limited to 180-270 degrees when enabled. |
| Hide empty segments | Hides chart segments for missing ancestors. |
| Show places | Displays birth and death places in the chart arcs where space allows. For descendants with many children, places are automatically suppressed. Choose the level of detail (full name or lowest 1-3 hierarchy levels). |
| Show parent marriage dates | Displays marriage dates in a narrow arc between each pair of parent arcs. When descendants are enabled, also shows the marriage date between the central person and their partners. |
| Show details panel | Shows the facts of a person in a side panel when you select a person, instead of the tooltip. Off by default. |
| Show family colors | Colors arcs by family branch. Paternal and maternal base colors are configurable via color pickers. |
| Birth and death date precision | Show full birth and death dates (DD.MM.YYYY) for early generations. Outer generations use a compact year-only format. Marriage dates switch to year-only from generation 7 and are hidden from generation 9. Descendants with narrow arcs automatically use a compact format. |
| Number of inner levels | Controls how many generations use the wider inner-arc layout with text along the arc path. |
| Font size | Scales the text size (50-150%). |
With Show details panel switched on, a click on a person selects the person and a panel slides in over the chart
from the right (from the left in right-to-left languages). It replaces the tooltip. It shows the birth and the death with
their places and further facts such as the occupation, and it has buttons to open the individual page and to center the
chart on the person. The chart stays usable while the panel is open. The panel closes with its close button,
with Escape or with a click beside it, a click on another person selects that person. Places show with their full name, whatever level of detail the chart arcs use. The facts come
from the tree setting Other facts to show in charts. The marriages and divorces of the person show as well without a tag in the setting, one entry per marriage with
the name of the spouse. The birth stays first and the death last, the facts between them are ordered by time. Above
the facts the panel shows the highlight image of the person, or the silhouette of its sex, and no image when the
tree setting for highlight images is switched off.
Interacting with the chart:
| Action | Effect |
|---|---|
| Click on a person | Re-centers the chart on that person, with Show details panel it selects the person and opens the panel |
| Right-click on a person | Opens a detailed tooltip with dates, places, and image, not with Show details panel |
| Tab, then Enter or Space | A person is reached with the keyboard and activated like a click, with Show details panel it is selected |
| Ctrl + scroll | Zoom in/out |
| Click and drag | Move the chart |
| Click center button | Reset view to center |
| Fullscreen button | Toggle fullscreen mode |
| PNG / SVG buttons | Export the chart as an image file |
Fatal error after a manual installation or update: Trait/Interface "MagicSunday\Webtrees\ModuleBase\…" not found (or ModuleAssetUrlInterface not found)
- You probably downloaded the GitHub-generated "Source code (zip)" (or used Code → Download ZIP) instead of the install-ready asset
webtrees-fan-chart.zip. The asset bundles the requiredvendor/dependencies; the source zip does not. Open the latest release, scroll to Assets, downloadwebtrees-fan-chart.zip, and re-extract. - If you used the asset zip, make sure you deleted the previous
modules_v4/webtrees-fan-chartfolder before extracting. Stale files from an older version can shadow the new bundled vendor code and produce the same error.
The chart does not appear / shows an error
- Make sure the module is enabled in the Control Panel under Modules > Charts.
- Check that your PHP version is 8.3 or later.
- Clear your browser cache and reload the page.
Images are not displayed
- Ensure "Show highlight images" is enabled in the tree preferences (Control Panel > Family trees > Preferences).
- Verify that media files are uploaded and linked to individuals.
Places are not shown
- Enable "Show places" in the chart options (under "Show more options").
- Make sure the individuals have PLAC fields in their GEDCOM records.
This section is for developers who want to contribute to the module.
Using Docker (no local Node.js required):
make install
make buildUsing local Node.js:
npm install
npm run prepare# JavaScript tests
npm test
# Full PHP + JS quality check
composer update
composer ci:test
