Git Product home page Git Product logo

d3-labeler's People

Contributors

tinker10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

d3-labeler's Issues

package for npm

Hey,
first of all, thanks for the great work!
It would be really nice to have the labeler packaged in npm if it is possible.

Best Regards
Jan

(Open question) How do you avoid being trapped by a local optimum?

When I run labeler on a (real life) example, I seem to get two possible configurations for a certain arrangement of labels. One is clearly better in my eyes, and also more probable (so I guess, "more optimal"). I wish there was a way to get this "better" solution โ€” maybe run several times, infer new starting positions, then do a final run?

The example is as follows:

France Suisse Autriche

I get several results:

       Suisse
France    Autriche
France    Autriche
      Suisse
France
      Suisse Autriche

The third is better and more probable, but 1 and 2 are local optima and I sometimes get them.

I wonder if we could use the changes from a first run to infer where the constraints are high, then try all combinations (maybe with a genetic algorithm if there are too many dimensions) of "top/down/left/right" on these specific points.

No License specified

I would like to be able to use D3-Labeler in projects, and to make improvements and contributions, but I am hesitant to do so when no license is specified. I suggest using either MIT or Apache license.

optimization via map

Do you think it would make sense to create a map to simplify identification of overlapping labels? The idea I had was to calculate the overlapping area using the number of squares in a grid system which could be as finely grained as pixels, based on the width and height, or could be broken up into larger sections for optimization.

label_overlap_topology

To further clarify, the map would be based on the number of labels that overlap at any particular x,y value in the grid. The initial map would only need to be created once and then could be updated as labels are moved. The benefit would be avoiding an iteration over every label for every label we're evaluating - rather you could consider only the (x,y) values to identify the overlapping area.

I can put together a PR request, but just wanted to discuss the idea first - maybe I'm missing something? Let me know if I can further clarify.

Thanks for this library! It is very useful ๐Ÿ‘

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.