clicking a node in d3 from a button outside the svg

后端 未结 2 2013
心在旅途
心在旅途 2020-11-29 17:47

I have created a force directed graph using D3 and displayed the id of the nodes in a normal div. I need to highlight the node whose id has been clicked in the div. I have s

2条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-29 18:10

    When you write:

    …and using normal javascript tried to click it…

    what do you mean?

    If you mean that you wrote code like:

    mySVGElement.click();
    

    then that is your problem. Not all DOM elements have a click() method like a

提交回复
热议问题