Comments (2)
Changed proptype of pathFunc from string to func. It was complaining about receiving the wrong prop when I passed a function but worked fine.
Can you raise a PR for this and we'll release v4.1.1 with this fix? (So as not to require users updating to the breaking changes suggested below)
I also passed "wrappedTextProps" as the last prop to the text element, that way I can overwrite the default dx and dy props given to it.
Technically a breaking change, although I can't imagine anyone is leaving those props and relying on them being overwritten. Still, I'd suggest batching this with the main change for safety since I'm going to suggest modifications that will make it a breaking change anyway.
I created a fork where I've create a "rect" boolean prop (which will then be checked and render a rect rather than a circle) and "rectProps" used rather than circleProps.
I think it would be better if this was implemented more generically like:
shape: PropTypes.oneOf(['circle', 'rect', 'polygon'])
with a default value of circle
.
I'm not convinced on shape
as the name of the prop though. nodeShape
?
Then there would be a single prop replacing circleProps
for this shape. Obviously, this is a breaking change so this would be release v5.0.0.
from react-tree-graph.
That makes a lot of sense, I'll see about making those changes this week or next week.
from react-tree-graph.
Related Issues (20)
- Changing data value of Tree causes the new tree to be overlaid on the old one HOT 1
- Node keys not appearing in onClick events
- Add zoom functionality HOT 8
- Increasing width of text HOT 2
- Translate values dont have units. HOT 1
- Options to change display per node HOT 2
- Options to change different icon per node. HOT 1
- Change stack order of an element ("z-index") HOT 1
- html example? HOT 1
- can add drag and drop the nodes? HOT 2
- Supported typescript ? HOT 1
- Is there a way for 2+ nodes to point to same child? HOT 1
- Possibility to display more data other than "name" HOT 4
- Right to left tree graph HOT 2
- Demo not working properly HOT 1
- How can i have tooltip when over on nodes ? HOT 1
- Straight line path function for links HOT 1
- Color leaf in diffrent color HOT 6
- Set hardcoded position (x, y) of the Node HOT 1
- Add TypeScript definitions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-tree-graph.