Code Monkey home page Code Monkey logo

Comments (4)

scottmartinnet avatar scottmartinnet commented on September 27, 2024

Update: this only happens when the circles are dynamically updated and a circle with a larger label is moved to the edge (making this even less likely to happen in the real world.

from venn.js.

benfred avatar benfred commented on September 27, 2024

I've seen this bug happen with long label names too.

The easiest fix is probably to shift the label left/right until it entirely fits inside the SVG. It might look a little weird with it not being centred - but probably will still be better than the clipped we have now.

I might take a stab at this tonight, it shouldn't be too hard to do a quick hacky version here.

from venn.js.

benfred avatar benfred commented on September 27, 2024

This is fixed by PR #17

from venn.js.

benfred avatar benfred commented on September 27, 2024

So - this is still an issue even with the scaling code from #17

Take for instance this diagram, the labels for the circle on the left are still cut off;
screen shot 2014-08-23 at 10 27 29 am

The problem is that the scaling assumes that everything is centred - where the label is offset to one side of the diagram. Also I think scaling further makes the whole thing look worse since the text and the circles ends up getting smaller.

To fix this, I added some code to wrap the text here instead (c13c42c). With this patch the same diagram looks like:
screen shot 2014-08-23 at 10 46 42 am

from venn.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.