@AnilPujar can you point to which D3 Dendogram visualization are you using? I dont know if there is one that is recently built or supported. Is it your own custom viz?
Nevertheless, if you have the DOM selected for last-child from where you need to fetch the value, you can use jQuery Selector based Click handler in Simple XML JS extension with Splunk JS stack to set the required token that can be accessed in the UI.
Following are some of my previous answers on similar lines but for different custom visualizations: