Open jimallman opened 9 years ago
Is it possible to specify a rounded cap style? That would improve the terminal branches as well.
Using paths is probably more efficient for rendering - at least that's what we found with the interactive SVGs in phylografter.
Using paths is probably more efficient for rendering - at least that's what we found with the interactive SVGs in phylografter.
We do actually use path
elements (vs line
s) all the current layouts. But each edge is a distinct path, so there are just some edge cases where multiple edges converge on a single node and their paths don't visually "merge" nicely (see the root node above).
Is it possible to specify a rounded cap style? That would improve the terminal branches as well.
Yes, the stroke-linecap
options are shown here. This style is applied per-path, so we can't have one square and one rounded end on a path.
Note also the stroke-linejoin
attribute on the same page, which is how we could tailor the appearance of the root node example above. If we're stubborn about wanting mitered joints here. But that would require combining all edges that join at the node into a single path. It's far easier to use the rounded cap!
I think that many paths of 1 line segment each is more expensive to render than 1 path of many segments. A consequence is that segments can't be individually styled, so e.g. to thicken well-supported branches an additional path would need to be overlain.
A consequence is that segments can't be individually styled
Right. I think we have the right balance already: a single path for each edge in the tree, which might include several points, segments and arcs (see attached).
So far we're getting pretty good results with the rectangular and circular layouts, but in some cases (like the root node of this cladogram) things are a little clunky:
@jar398 suggests that we might remedy this by simply extending edges, or using more complex paths instead of isolated segments.