mistic100 / jQCloud

jQuery plugin for drawing neat word clouds that actually look like clouds
mistic100.github.io/jQCloud
MIT License
268 stars 106 forks source link

weight vs word count #10

Closed ghostsquad closed 8 years ago

ghostsquad commented 9 years ago

I was wondering if I should be doing so special math to normalize weights. Given a very small word cloud like this:

var words = [
    { text: "blah", weight:  2 },
    { text: "test", weight:  1 },
    { text: "foo", weight:  1 },           
    { text: "bar", weight:  1 },
];

The cloud that is generated chooses the absolute largest size for the word with weight: 2 and the absolute smallest size for the words with weight: 1.

If I set "steps: 2" on cloud options, then I get the 2 absolute smallest font sizes.

mistic100 commented 9 years ago

I cover understand what is your problem

ghostsquad commented 9 years ago

I'd like to be able to get the "in-between" font sizes even when there's not in-between weights.

mistic100 commented 9 years ago

still no clue of what you want

add a complete example, schematics if you want, but here I can't help you

rubenheymans commented 8 years ago

you can set a class {text: "PPE", weight: 10, html: {class: 'weight-10'}}, and set font-size in css: #home .cloud .weight-10 { font-size: 30px; color: #00348F; }