-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layout of circles goes horizontal when multiple large circles should be positioned next to a small circle #9
Comments
Allow users to specify hints to how important each intersection area is when laying out venn diagrams. Fairly niche use case - but might help fix issue #9
Yeah - this is working like its supposed to (just not like you want it to =(. I'm assuming that the output you want is something like this: The problem with that diagram is that sets (0, 1, 3, 4) shouldn't be overlapping at all according to the overlap areas you are passing in - making it have a higher loss function than what its producing. Look at PR #10 for a proposed method to overcome this. If it works for you - I'll merge it to master . |
Heh, that makes total sense. I suspected something like that but didn't know how to express it. This code works great, except for the fact that the diagram produced is taller than it is wide. In the 625x375 window, it would fit better rotated 90 degrees, and other arrangements lay themselves out that way. I don't know if that's related to this at all; I can create a new issue if you want. Regardless, this is a great improvement for our case. Here's an example of the code for a diagram that gets laid out horizontally, the way that it intuitively seems the above should be laid out:
Thanks so much for helping out with this. The implementation of this diagram in our platform has already really impressed people at my company. |
fixed by #10 |
Here's the code that renders a diagram that demonstrates the problem:
It should be placed in a directory with venn.js and d3.js.
My goal is to display the relationships between one circle (the "pivot"), and all the other circles. In this diagram, the pivot is circle 2. In the overlaps variable, set 2 has non-zero overlaps with all the other circles, and all the other circle circles have zero overlaps with each other (because we only want to see the relationship between the pivot and the others). But when the diagram renders, all the circles are placed in a single horizontal row, instead of grouping them around circle 2.
This appears to happen when the pivot is too small. In this example, if you make the size of set 2 50000 instead of 297, the circles are laid out properly (but of course no longer accurately reflect the size of each set).
Is this intentional behavior? I can see doing this if the circle was so small that you couldn't fit the larger circles around it, but it seems like there's plenty of room here.
The text was updated successfully, but these errors were encountered: