-
Notifications
You must be signed in to change notification settings - Fork 270
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
Allow passing SVG shape prop (e.g. <rect>, <polygon>) to use as SVG element for nodes #31
Comments
Hey @dirodrigues, sorry for the delayed response! That's a good point, being able to pass SVG shapes as a top-level prop would be way better. Will jump on this hopefully tomorrow after work or during the weekend, in the meantime feel free to put in your own PR for it if you'd like :) |
Hi @bkrem, I'm going to give it a go today, I'll keep you posted. |
Awesome! There should really be a "Contributing" section in the README (still todo), so let me know if something is unclear/you get stuck, I'll do my best to reply to you ASAP. |
Hey @dirodrigues, Have some time this week to work on this, but will hold off if you're still looking to publish a PR. Happy to help out on your fork or merge your WIP into a feature branch here if you want to collaborate :) |
Hey @bkrem , |
Hey @iqbalhussain931, Thanks, always nice to hear kind words after putting a lot of effort into something like this :) Yeah I'm keen to get this implemented since I'm sure there will be plenty more people looking to do this in the future. Also feel free to open issues for feature requests if you have any more! |
Just to get a clear picture, what i want my tree to look like. @bkrem Thanks in advance. |
That's a great use case @iqbalhussain931. It's the level of complexity I'm aiming at getting the library to when it comes to specifying shapes for each individual node. I've almost finished the |
Exactly specifying shapes for each individual node 👍 for now setting a single shape for all nodes will do :) |
@bkrem can you make a build or release of this feature and merge it with master ? |
@iqbalhussain931 Literally about to do that! Wanted to add another prop ( Should be up in ~20 mins |
Released in v1.5.0 ✨ ( 👉 Release Notes, updated demo) Closing this feature request now. |
@bkrem great work 👍 but i think wouldn't it be better if a node(circle,rect) its self contains the text(name,attribute) in it as i have shown in the example picture, Or as it is now in v1.5.0 node shapes are perfect but text(name,attribute) could be in another shape example rectangle and easily style that rectangle too. what you think would be best? |
@iqbalhussain931 I agree, unfortunately "a contains b" seems pretty complex on an SVG canvas since it's basically just an x-y axis graph without in-built relative layouts. I'm considering how this can nicely be solved for v2. |
yes i have checked the demo its nice. i appreciated you effort on this thank you for this feature. though i have lots of ideas and love to share them with you to make tree more rich easy to use and most importantly interactive for users. |
That would be awesome! Feel free to just open another issue with a feature description and we can do that 😄 |
Hi there, first of all awesome work on this library.
I am very very new to using d3, I was wondering if it is possible to render rectangles instead of circles.
I am trying to implement something along the lines of this: http://justincy.github.io/d3-pedigree-examples/basic.html , and would love your help.
Looking into your implementation
https://github.com/bkrem/react-d3-tree/blob/master/src/Node/index.js#L91
I can see that you have hard coded circles, would you consider changing this so that whoever is using this library can choose the shape and you could have the circle by default?Cheers
The text was updated successfully, but these errors were encountered: