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

margin problem #24

Closed
mef opened this issue Oct 2, 2014 · 1 comment
Closed

margin problem #24

mef opened this issue Oct 2, 2014 · 1 comment

Comments

@mef
Copy link

mef commented Oct 2, 2014

I'm having issues in some diagrams where labels are long and don't containt spaces (15 characters), so text doesn't get wrapped and part of it gets hidden outside of the SVG's area. Margins in the svg should fix this problem, but are not supported by venn.js.

Also, I need to specify other attributes to the svg element, like viewbox and preserveAspectRatio.

It seems more logical to me to pass a selector to an svg element to venn.js, instead of having venn.js create the svg element itself. What do you think?

I've refactored in Mango-information-systems/venn.js@6dd277608c6, let me know if I should send you a PR.

P.S.: Great work! Thanks for creating this library.

@benfred
Copy link
Owner

benfred commented Oct 3, 2014

thanks! I'm glad its coming in useful.

I agree that the API here needs some work. Passing in a selector makes sense - but I was thinking about going even farther and trying to model the API like: http://bost.ocks.org/mike/chart/ (which also satisfies #4). I've started on this, but probably won't be able to finish this soon because of an upcoming work deadline.

In the short term, you can modify the SVG being returned to add the margin - or you can increase the whitespace around the diagram by passing in a 'padding' param like :venn.drawD3Diagram(element, dataset, width, height, {'padding' : 50} ).

@benfred benfred closed this as completed Oct 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants