benfred/venn.js

Adding + removing circles re-use same colors

glentakahashi opened this issue · 2 comments

For example, if you start with two circles blue + green, remove one of them, then add another back, both with be blue.

This is when you dynamically update the data

Do you have an example? This should just work.

For instance in this post http://www.benfrederickson.com/distance-metrics - if you change the artist to something unrelated , and then change back to the original the colours for each artist will be the same as when first presented

Sorry my bad, I wasn't re-using the same VennDiagram object. (I was creating a new one on each call).

I got this working