bumbeishvili / org-chart

Highly customizable org chart. Integrations available for Angular, React, Vue
https://stackblitz.com/edit/web-platform-o5t1ha
MIT License
928 stars 330 forks source link

nodeButtonX #342

Closed mamjerez closed 11 months ago

mamjerez commented 11 months ago

You can change the position of all nodeButtons with .nodeButtonX(() => -20). Is it possible to change the position of each nodeButtonX individually for each node?

Thanks

bumbeishvili commented 11 months ago

Yes, it works in the same way as nodeContent

chart.nodeButtonX((d)=>{
    if(d.id=='node1) return 20;
    if(d.id=='node2') return 30;
    return 60
})
mamjerez commented 11 months ago

Thank you very much for your quick and effective response. It works perfectly.