org-chart icon indicating copy to clipboard operation
org-chart copied to clipboard

Resize node when click an element inside

Open milhlhat opened this issue 10 months ago • 4 comments

Hi bumbeishvili, how can I change width, height of node when click an element inside node? Thankyou so much!

milhlhat avatar Apr 22 '24 07:04 milhlhat

@milhlhat same way as usual, just rerender the graph

Pseudocode

clickHandler = (nodeData) =>{
   chart.nodeWidth(d=> d!=nodeData?oldHeight:newHeight)
  chart.render()
}

bumbeishvili avatar Apr 22 '24 11:04 bumbeishvili

@milhlhat same way as usual, just rerender the graph

Pseudocode

clickHandler = (nodeData) =>{
   chart.nodeWidth(d=> d!=nodeData?oldHeight:newHeight)
  chart.render()
}

Could you please give an example? and I don't know how binding clickHandler in nodeContent

milhlhat avatar Apr 22 '24 16:04 milhlhat