Displays a "Tag Cloud", a visually enhanced set of links.
Creates a Tag Cloud inside div . Options are specified
in optionsObject :
Removes all items (links).
Adds a new item. Its label is name , link is
an URL. Third argument, frequency is optional and
defaults to 1.
Draws the Tag Cloud.
Create color based on size (
frequency).
Periodically cycle all specified colors.
Use randomly chosen color for each item.
var colors = ["#f00","#0f0","#00f"]; var sizes = ["80%","100%","120%"]; var tc = new OAT.TagCloud("myDiv",{separator:", ", colorMapping:OAT.TagCloudData.COLOR_SIZE, colors:colors, sizes:sizes}); tc.addItem("Label 1", "http://", 10); tc.addItem("Label 2", "http://", 5); tc.addItem("Label 3", "http://"); /* frequency == 1 */ tc.draw();