Closed scottrepreneur closed 1 year ago
I'm having trouble setting a non-default color for the linked lines. Trying to follow the README instructions:
.linkUpdate((d, i, arr) => { d3.select(this).attr('stroke', 'red'); // d3.select(this).attr('stroke-width', 2); })
Here's a forked js sandbox. https://stackblitz.com/edit/d3-org-chart-react-integration-hooks-shjp76?file=OrgChart.js
Getting an error on run/build:
this.setAttribute is not a function
Is there another way to accomplish this with the react instantiation?
You are using the arrow function and this does not refer to the correct object. Pass a function callback instead
function
I'm having trouble setting a non-default color for the linked lines. Trying to follow the README instructions:
Here's a forked js sandbox. https://stackblitz.com/edit/d3-org-chart-react-integration-hooks-shjp76?file=OrgChart.js
Getting an error on run/build:
Is there another way to accomplish this with the react instantiation?