donatso / family-chart

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

Multi Line Support #3

Closed Vanshbordia closed 2 years ago

Vanshbordia commented 2 years ago

I tried adding another tspan in the js file but it doesn't seem to render the third line. Is there something I am missing / can it be added as a feature?

donatso commented 2 years ago

Yes, it seems that I fixed it to 2 tspans. Below is a quick fix for that, but in the future I will provide better solution :)

In this example (https://codesandbox.io/s/family-chart-static-multiline-card-label-hxqqwe?file=/index.html) you can see cardDisplayMultiLine function that will help you create multi line card label. Hope it works out for you.