New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility to add metadata overlay? #64
Comments
Dear @pschwien82, Not the prettiest solution, but should get your started: http://bl.ocks.org/spond/707878838762cb57d892a5d8e774d4e0 The idea is to use the callback invoked when each node is drawn ( @stephenshank : if you look at the example, it exposes some of the limitations of the node styler callback, which we should discuss how to remedy. For example, there should be no need to manually handle rotations and shifts for radial layouts, and there needs to be a mechanism to request layout space for node labels to accommodate arbitrary elements. Best, |
Thank you Sergei, Best, |
Hello again,
The first output looks like this: This project I am working on is part of an exam that I'll have in late June and if the output of the project will be functional then it might end up being used as an official tool on this website: Thanks for your help. |
Dear @carlotta-93, I think both radial trees are the same, just that the second one uses an "annular" display near the center to space things out a bit differently. I will make a note to track down why the layout changes between the two iterations (it should be stable), but the tree is not wrong in either case. I'll update this thread when I have a solution for stable rendering. Best, |
Hi @spond, For stable rendering you mean when "longer" shapes are added ? Shall I add some pictured to make the problem more clear ? Thank you very much for your help. |
Dear @carlotta-93, Yes, more pictures would be helpful. By stable rendering I mean that when you switch between radial and linear views, you should get the same renderings for each mode regardless of how many switches occur. Best, |
Dear @carlotta-93, It looks like you are toggling bar plots on and off. In order to understand what phylotree is doing at that moment, can you provide the code for your event handler for when the annotations are added? Best, |
Hi @spond,
The select_data arguments is an array of dictionaries as follows: |
Hi,
we've been working with phylotree for a while now and ran into the need to display metadata in addition to the phylogram. An initial hack got us 80% towards that goal (see below) but it is still very buggy and does not work on the circular tree at all. I was wondering if such a feature, or an interface/plugin to customize any sort of data overlay would a) be of interest to others and b) could be added to the code base. We are unfortunately not savvy enough to just fork and add the feature ourselves.
Example of our current hack, showing 5 metadata points overlaid with the sample in the tree. Other ideas like colored symbols or even pie charts per leaf would be great to have in the future.
Thanks,
Patrick
The text was updated successfully, but these errors were encountered: