new WordCloudRenderer(spec)
Instantiate a WordCloudRenderer object.
Name | Type | Description |
---|---|---|
spec |
Object |
The specification object.
text: { textKey {String|Function} - The attribute for the text in the data entry. countKey {String|Function} - The attribute for the count in the data entry. themes {Array} - The array of RenderThemes to be attached to this component. } } |
Extends
Methods
-
inherited addHook(hook)
-
Add a hook function to the renderer.
Name Type Description hook
function the callback function. -
inherited removeHook(hook)
-
Remove a hook function from the renderer.
Name Type Description hook
function the callback function. -
render(data){Object}
-
Implementation specific rendering function.
Name Type Description data
Object The raw data for a tile to be rendered. Returns:
html to render and an array of all rendered data entries.
-
inherited select(selectedEntry)
-
Select all entries in the rendered layer that also share the same selected value. The 'selectKey' of the 'select' option must be set.
Name Type Description selectedEntry
Object The selected data entry. -
inherited unselect()
-
Unselect all entries in the rendered layer.