benfred/venn.js

Label don't update on dynamic venn.

djpate opened this issue · 1 comments

I've been playing with dynamic venn following the example.

I've noticed two things.

  • If you have a single circle then you can't dynamicly change it size.
  • If you are using labels, they don't change if you want the data set.

Right now I got around it by removing the div and recreating it everytime but I would love to keep the animations if possible.

Any tips?

I fixed the labels not updating. The problem seems to be that when doing a data join in D3 - it returns the previous object rather than than the new object (meaning that the label attribute still had the old value). I fixed in the last commit by setting explicitly to the new version.

For your other issue - the diagram automatically scales itself to fit in the specified width/height. With a single circle, this means it will fill the whole div.