Tag clouds

From Fernseher
Jump to navigationJump to search

So, an ajax request is sent off to get a list of tags and values/frequencies associated with those tags, along with skew data for the values and frequencies to help determine scale factors and low end cutoffs.

Based on that sort of data, the tags are added in spans to the object that requested them. Each span, on mouseover, can show the tagname, the value, and the frequency associated with it. On click, the requestor's action can be performed, given its current context and the tag that was clicked.

The span has a font-size and font-color associated with it. The origin color is given for the cloud as a triple, along with a color vector, again, as a triple. The color vector encodes the color gradiant direction and scale. The ratio between the cloud's minimum color and origin color is set equal to the ratio between the cloud's origin color and maximum color. The cloud's origin font size and maximal font-size are also given. Font is treated logarithmically, so that the ratio between origin and max is the same as the ratio between min and origin.

Sn=So(1-So/(So+Sv)) |Cn|=|Co|(1-|Co|/(|Co|+|Cv|)) Cn=Cv|Cn|/|Cv|

Origins are treated as mean values, with the minimum value at minimum size/color, and maximum value at maximum size/color. Typically, one one sigma below mean is displayed, but all values above mean.