Hey all - since tag clouds are so popular these days, I thought I'd make a quick post about the algorithm I'm using to generate my tag cloud. I found a few sample algorithms already out there, but many of them seemed either inefficient, or didn't return the size that I was expecting.
Considering that the algorithm I'm using for my blog is running on the client side, I wanted to make sure that it was especially efficient. Here's what I ended up coming up with.
First, let's define the variables that are being used:
The font size is set as a percentage. This is the font-size percentage th
Additional text has been truncated due to copyright reasons. Things without URLs and private things don't get truncated.