react-d3-graph
react-d3-graph copied to clipboard
add link.view_generator
This PR add link pathGenerator, when pathGenerator is used, it supports customizable link.
Hi @yoshi6jp ,
Thank you very much for opening this PR, it will be an awesome addition to the library.
From an API point of view, what do you think about making it like the node.viewGenerator?
Which would be :
- renaming
pathGeneratortoviewGenerator - passing all the node props to the generator instead of passing
linePropsand other props, once more to make the API look like thenodeGeneratorAPI
Hi @dgautsch , @antoninklopp I fixed PR
- rename pathGenerator to viewGenerator
- change link.viewGenerator parameters
viewGenerator: (props, options) => (
<CustomLink
label={props.label}
source={props.source}
target={props.target}
id={options.id}
textProps={options.textProps}
lineProps={options.lineProps}
/>)