Emmanuel,

Thanks.  I'll have a look at this, but don't have much time at the moment.

So far, I have simple functionality including the basic chart, panning/zooming and a preview window.  I need to improve my ancestor and descendant highlighting and add filter functionality.

I use graphviz for the layout (as does GeneaQuilts) which is quite fast when tweaked.  I use pygoocanvas for the actual graphics, which also works well.

Nick.


On 26/09/12 13:39, Emmanuel Briot wrote:

Nick,

I am sure you have been able to make progress on this view by now.
Just in case you are interested however, I have implemented a quilts view
in my toy application geneapro. This is GPL code, so you are of course free
to copy all or part of the code as you like. There are several packages
involved:

    - geneapro/utils/graph.py
      Contains a standard directed graph data structure, independent from
      genealogy, which among others provide various layout functions to split
      the nodes into layers and sort the nodes within each layer to minimize
      the number of edge crossings.
      The ranking of nodes is not optimal yet, and certainly not as good as
      graphviz provides, I am still working on that part. Still, it does a descent
      job to get started.

    - geneapro/view/graph.py
      is the django view for the Quilts view. The function from_db is the only
      one specific to geneapro, that would have to be changed for Gramps.
      It basically creates a graph of all persons in the database, with parents
      and spouses relationships. It then computes the layout of the graph.

   - resources/media/quilts.js
      is a javascript implementation of the quilts view itself. It draws the
      pretty picture and allows the user to click on a name to highlight all
      ancestors and descendants. This could be interesting to gramps online.

Geneapro will probably never be a full blown application, so I would love to
have such a view in Gramps itself. If you think there is anything worth reusing
in the code, please feel free to do so, and ask questions if some things are
unclear. The code is not industrial quality yet (as I mentioned, the ranking
could stand some improvements).

Git:
https://github.com/briot/geneapro

Screenshot:
http://briot.github.com/geneapro/screenshots.html


Emmanuel