Giter Club home page Giter Club logo

Comments (3)

jasondavies avatar jasondavies commented on May 21, 2024

This is currently expected, because the layout attempts to place words within a fixed-size rectangle. If the words are too large and they cannot be placed without overlapping, then they are dropped.

The solution is to figure out the right size for your words. If you want to show all 1,100 words, then perhaps your size needs to be much smaller.

It would be nice to automatically figure out the right size for words, perhaps using a heuristic based on the value distribution, so I’ll leave this issue open as a reminder to look into this.

from d3-cloud.

charlie82 avatar charlie82 commented on May 21, 2024

Hiya. Thank you for taking the time to response.
I found that using the linear scale solves the problem :)

Just to clarify for anyone else viewing this, I have about 7500 words that I was pushing into the script, showing a maximum of 250 words.
With the log n scale, the cloud would only generate about 60 words into the cloud.
Using the √n (sqrt) scale, I'd get about 160 words.
And finally, using the n (linear) scale, I'd get all 250 words.

I hope that helps someone

from d3-cloud.

simonwiles avatar simonwiles commented on May 21, 2024

I wonder if anyone has had any further thoughts on this? It wouldn't be much of a problem if it only showed the top so many words, but as it stands it is possible for some of the most significant words to be dropped, and this results in some odd-looking clouds.

from d3-cloud.

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.