Skip to content
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

specify a circle size for scale #76

Open
harlanlewis opened this issue Jul 26, 2016 · 4 comments
Open

specify a circle size for scale #76

harlanlewis opened this issue Jul 26, 2016 · 4 comments

Comments

@harlanlewis
Copy link

harlanlewis commented Jul 26, 2016

Hi there, great work on venn.js!

We're using it to display a number of different results relative to a single value, as in this screenshot with each venn containing a circle with value 224:

image 2016-07-26 at 10 17 45 am

Is there a way to specify a size for a single circle in a set to establish scale? For our use, consistently sizing the 224 circle would make it much easier to compare values across multiple venns.

I'd expect this to interact with SVG width and height, as circles could be larger than the SVG boundaries. Clipping at the SVG edges seems satisfactory.

If this isn't supported or planned, would you be open to a PR supporting it?

Also, thanks for adding circle sorting (#56), a big help for our use case!

@benfred
Copy link
Owner

benfred commented Jul 26, 2016

So - the scale is dynamically calculated in the src/layout.js:scaleSolution function based off the width/height and size of the solution.

To maintain a constant scale, I think what you want to do is add a 'scale' attribute to the VennDiagram object and then have the scaleSolution function use it if set instead of calculating based off of width/height.

I can add this pretty easily, but won't have a chance until at least this weekend. If you want to do it, I'm open to a PR =)

@harlanlewis
Copy link
Author

Thanks for the response! That approach makes sense to me. I'm also unlikely to get to it this week, but if you leave it open I'm happy to give it a shot in August.

@wykhuh
Copy link

wykhuh commented Sep 10, 2018

Was the ability to set a constant scale ever added to the library? I also have multiple venn diagrams on a page, and would like the ability to compare values across multiple venns.

@noahfinerp
Copy link

Also need to use this feature in a project I'm working on! Checking in again on if this has been implemented or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants