2-Way fan charts from the CLI; accessing gramplets from the CLI

5.1.5, Manjaro

So, it seems like there are some off-the-cuff ways of creating charts in the UI using gramplets, as well as some ways of officially generating them as reports. Similarly, there are some reports that can be generated via the CLI, but many appear to be undefined/elusive. It would make sense to me if the charts themselves were modular and could be used by Gramps to generate images for both the CLI and the UI because they’re plotting pixels. However, I’m worried that they are not.

For example, by omitting the name of the report (or using an invalid one) from the command-line, you will get a list of supported reports (this is the default/builtin list in Arch, as I haven’t installed any additional plugins):

Using options string: name=
Report name not given. Please use one of [-p|--options] name=reportname
 Available names are:
   ancestor_chart            - Ancestor Tree
   ancestor_report           - Ahnentafel Report
   birthday_report           - Birthday and Anniversary Report
   calendar                  - Calendar
   descend_chart             - Descendant Tree
   descend_report            - Descendant Report
   det_ancestor_report       - Detailed Ancestral Report
   det_descendant_report     - Detailed Descendant Report
   endofline_report          - End of Line Report
   family_descend_chart      - Family Descendant Tree
   family_group              - Family Group Report
   familylines_graph         - Family Lines Graph
   fan_chart                 - Fan Chart
   hourglass_graph           - Hourglass Graph
   indiv_complete            - Complete Individual Report
   kinship_report            - Kinship Report
   navwebpage                - Narrated Web Site
   notelinkreport            - Note Link Report
   number_of_ancestors       - Number of Ancestors Report
   place_report              - Place Report
   records                   - Records Report
   rel_graph                 - Relationship Graph
   statistics_chart          - Statistics Charts
   summary                   - Database Summary Report
   tag_report                - Tag Report
   timeline                  - Timeline Chart
   WebCal                    - Web Calendar
Cleaning up.

I’m specifically interested in 2-way fan charts. I think they’re beautiful and I’d like to automate them. However, 2-way fan charts are not in this list.

It looks like all of the calls to newplugin() in these two modules satisfies 28 of the 29 reports on that list:


(I can’t provide the links due to limitations on new users.)

However, it doesn’t seem like just any chart can be invoked from the CLI, correct?

I thought I might just try to load the plugin and then list the available reports, but that didn’t yield any different results:

gramps -i kander.ged -a report -p name= --load-modules=fanchart2way

I also tried the above with the “gramplet” plugin.

I realize that gramplets, which are sort-of subplugins (modules underneath the “gramplet” plugin) may not follow the same rules. Are we able to access gramplets from the CLI? I did a quick search, and it seems as if they can not. Please confirm.

I have the same issue with producing the narrated websites from the CLI.

I was unsuccessful trying to find anything about generating charts/reports from the CLI that wasn’t just the same basic knowledge repeated a bunch of times.

Would it be possible to write a plugin that gets one of these graphical charts to render and then step-in to capture/dump the canvas? There are three modules that relate to 2WFCs:


The first two mention Cairo. I’m not sure if one plugin can access/actuate that context/resource in another, though.

FYI, I found the original fan-chart (not 2-way fan-chart) implementation discussion, which was an endearing read:

I tried sharing the Github links to the files above as comments, but Discourse then flagged and hid the overall post as spam. I tried deleting the comments, but was told that I had done too many and was blocked for doing any further removals for twenty-four hours without any actually being removed at all. Funky policy.

EDIT: ← Apparently someone opted to remove my Github links to the files. Funky community.

The last, sort-of link, since I’m not being allowed to paste another link to Github (or even a mention of its site):


The listing shows the older “Fan Chart

Looks like a programmer/somebody would need to turn the Fan Chart & 2-way fan chart View/gramplets into reports also! If it does not exist already consider raising a Feature request?

Links for the above, since I’m no longer classified as a “new user”.

FYI, are you aware of a documented process, or at least a set of requirements, for doing this? I’m curious if there’s maybe just some way of wrapping it with some fairly common boilerplate without needing to actually touch the charting mechanics in order to accomplish it.

It would wonderful if a report existed for the two-way fan. There is a print option in each of the Charts category view modes for the 3 types of Fans. But that doesn’t get you the CLI access nor the ability to add that chart style to a Book of reports.

There is currently a Report Writing wikipage that labels itself as a “Tutorial” but it is more of an outline for a tutorial with the example portion completed.

What you suggest about having a framework/template for cross pollinating all 3 plugin containers (view mode, gramplet and report) would be even better. Then it would be less of a project to synchronize upgrading a Chart style family (like 3 types of Fans) that exist in all three plug in types.
Or to upgrade ALL the Chart View modes with features like Print, help or synchronizable Configure options. Or add similar Configure options to all Chart gramplets. Or make the fill color effect of Custom Filters applicable to all Fan Charts variants in all plugin types. Or to improve the control of font-scaling … this is still a major deficiency when Printing, in reports and for zooming.

Also of interest is that the Ancestral Fan Chart, Narrated Website, Web API and Betty each have their own Fan Chart implementations. Each with some qualities that are superior and their own defects. For instance, some of the charts in the Web API offer hairline borders and corner rounding of chart shapes. They make a far more elegant and scalable presentation on high-resolution monitors.

A couple years ago, there was a brief discussion asking how much is involved in replicating a Chart in the between a view modes and report with mention of flip-flopped 2-way Fan … with ancestors in the inferior position as a possible target project for documenting re-use chart code in the different plugin types.

And there have been a number of Fan Chart enhancements to the 5.2 development fork including:

@GaryGriffin created a sample-report-for-new-developers thread.

Maybe coordinating a tutorial project to show implementing the same chart in the different plugin types is somewhere you could help the project?

It would be a ‘force multiplier’ since having a variety of developers trying to upgrade EACH the existing builtin chart types would be a necessary part of the tutorial development. And that could also be a harmonization project for 5.2? The Addons Charts could follow since they have a slightly different .gpr.py and are not limited by the Gramps Major/Minor release schedule.


The automated Discourse system seems to do weird things to new user posts when it flags the posting. Your postings were automatically red-flagged for too many advanced things by a new account: too many hyperlinks, too many edits, too many postings in the first 24 hours and 30 days. Your account account has been upgraded from ‘new’ to ‘basic’ because you’re obviously not a spam robot. (Plus the developer-level Gramps specific questions.)

We are not expert admins of Discourse and this forum is hosted by the Discourse developers as part of their support program for Open Source projects. But we suffer continual updating to the bleeding edge of their tools.

I am not a developer but have been granted some low-level Discourse admin (Moderator) rights because of being something of a Forum busybody. So I have manually recreated the links to the GitHub content… and a few others.

I’ll take a look to at least see what the effort would look like.

1 Like

Sounds miserable. It seemed to be enthusiastically doing its darndest to keep me from getting involved. I appreciate you interceding.