This is a WordCram-inspired WordCrowd layout written in JavaScript.
![WordCrowd screenshot](images/Capture.JPG) ## USAGE:
Download zip or clone it using the following command.
`git clone https://github.com/project-spinoza/WordCrowd.git`Navigate to the examples directory and run the index.html file in web browser.
## Running WordCrowd: `var settings = {``"container":"body",`
`"data":"Input text data for visualization"`
`};`
`var wordCrowd = new WordCrowd(settings);` ## Settings:
Global setting for wordcrowd container.
* containerSelector of the wordCrowd container element
default value `body`
`container : "#wordCrowdContainer"`
* datainput text which WordCrowd will generate graph.
default value `Input text data for visualization`
`data: "Input text data for visualization"`
Data can also be given in the form of json.
`data: "[{word:'first word', size:12},{word:'second word', size:10}]"`
* widthWidth of WordCrowd container.
default value `800`
`width:800`
* heightHeight of WordCrowd container.
default value `600`
`height:600`
* background :"white"Background color of WordCrowd container.
default value `"white" `
`background :"white"`
* fontsize_rangeSizes of words in proportional to their relative frequencies. Words with high relative frequency will get larger font_size compared to those with lower relative frequencies.
default value `{ min : 12, max : 36 } `
`fontsize_range : { min : 12, max : 36 }`
* hover_colorWords color on hover.
default value `"#000000"`
`hover_color :"#000000"`
* colorsWordcrowd words color
"random" will assign random color to each word.
default value `"random"`
`colors:"random" `
Custom color can be assigned to wordcrowd.
To color black each word in cloud:`colors:"#000000" `
* collisionnumber of iterations before a word is placed in specified container.
'min' Minimum number of iterations.
'max' Maximum number of iterations.
default value `min:500,max:1000`
`collision:{ min:500, max:1000 }`
* sortDescendingspecify the order in which words will be arranged in container based on their relative frequencies.
default value `sortDescending:false`
* angleslist of angles each word can take to rotate. Each angle must be between 0 and 360.
default value `[0,90] `
`angles : [0,90] `
* font_familieslist of available font-families.
default value `[ "Verdana", "Arial"]`
`font_families:[ "Verdana", "Arial"]`
* readFromFilepath to external data file.
data format must be specified in settings options.
json format: `readFromFile:{ type:"json", fileLocation:'json file location' }`
text format: `readFromFile:{ type:"text", fileLocation:'text file location' }`
default value `readFromFile:{ type:"text", fileLocation:false }`