This task is about implementing an awesome "Tag Cloud" for Cronos (or more likely, we will try not to make it too horrible).
Proposed solution n. 1
Every now and then I like to reinvent the wheel so this how I would generate a Tag Cloud with variable font-size according to the importance of each Tag.
Having this proportion:
minTagCount : maxTagCount = minPx : maxPx
From that relation you can obtain this formula:
Where:
Name | Description | Type |
---|---|---|
tagCount | weight of the Tag (for example 2 if its used 2 times) | variable |
maxCount | max tagCount available in the Tag set | constant |
minCount | min tagCount available in the Tag set | constant |
maxPx | maximum font-size in pixels desired | constant |
minPx | minimum font-size in pixels desired | constant |
So the idea is to just shuffle the Tag set (retrieved by the freshly introduced Cronos._tags() method) and display the Tag chips bigger of smaller by that formula.
This was more-or-less how I've implemented a Tag Cloud from scratch in another project. This is how it appeared:
Over the next few days, I would like to try hammering this thing into Lua.
Proposed solution n. __
...