Skip to content

Create custom wiget on existing graphs representations for plant line genealogy

We would need to display the genealogy of a plant line of choice a bit like this:

image

For this, I guess only a custom widget would do. This is not easy to implement but there may be simple options to start off with (see below).

Here are some of the most desirable feature:

  • the line selected in a table widget appears with a different color in the graph.
  • all line ids appear as a label in their cognate node.
  • the graph is interactive and (selected) features of the plant line nodes can be displayed (plotly-like)
  • the number of displayed generations above and below the selected line can be parametrized. Usefull for very long genealogies.

To get started, one could take a look at this post on the grist discussion list: https://community.getgrist.com/t/execute-scripts-in-the-html-viewer-custom-widget/5235

It shows how one can make use of the built-in HTML Viewer Grist Widget to render Mermaid.js charts. It so happens that among the rich set of charts that can be rendered with Mermaid.js, there is this flowchart graph that may help us get started. Yet one need to figure out how generate the html code dynamically for the selected plant line...