donatso / family-chart

family tree visualization built on top of d3
MIT License
179 stars 63 forks source link

Customize onClick event on Card #5

Closed antrandng closed 2 years ago

antrandng commented 2 years ago

I searched for this but I don't see anywhere. I want to add event onClick on the card so I can do other things such as show full info. Could you help? Also anywhere I can see the full options/parameter or all the methods? Thanks

donatso commented 2 years ago

Hi anonymous, Yes, there probably should be some method for onClick, but at this version there is not. But there are ways to do it.

https://codesandbox.io/s/family-chart-static-forked-4qzs15?file=/index.html In this sandbox you will see that I console log data point when card is clicked. I hope you can find a way to build from that.

Some list of params would be nice as well. When I find time for this project I will provide more documentation. In meantime feel free to drop a question here :)

wingchunna commented 7 months ago

Hi Donatso, i've seen your link https://codesandbox.io/s/family-chart-static-forked-4qzs15?file=/index.html but i dont know where onclick event on VueJS. Pls show me how, thanks !