Closed a1an77 closed 6 years ago
I tried using the showScaleBar parameter in jsphylosvg but it seems a bit too rudimentary (label crosses the tree in my case). I think the best option would be to show the bar under the tree (same level as the horizontal scrollbar for the sequence area) in its own div.
It looks like there is a problem causing the scale bar label to be drawn in the wrong svg (svg2).
I've now modified the scale bar in jsphylosvg to be dynamically computed (showScaleBar = "auto") and restricted to at most 80px before percent scaling to try to avoid overlap with the tree. Not the best solution but still better than no scale bar at all.
There is no place on the tree canvas or length limit that would prevent scalebar overlap with any tree. I resolved the issue by drawing the scalebar below the tree, outside of the canvas. The scalebar will resize with the tree and can be enabled/disabled from the settings dialog.
That is definitely the best solution. I can't find the option in the dialog in the online demo, is it maybe out of sync? Is the scale bar dynamically computed (meaning its value will change accordingly to actual branch lengths to keep it within a defined length limit, hence avoiding very long or very short bars)?
The toggle is in tree settings (tools->settings->arrow with “tree leaf labels”). Scale bar takes the length of the largest decimal unit (10/1/0.1/..) that fits the tree e.g. the tree length unit.
The tree shows the different branch lengths but there is no scale bar at which the user can get an idea of the actual meaning of the visualized branch lengths. A scale bar would greatly improve usability of the tool.