src/app/services/tag-cloud-processor/tag-cloud-processor.service.ts
Tag cloud processor service
Methods |
|
constructor(excelDateFormatterService: ExcelDateFormatterService)
|
||||||||
Construct the tag cloud processor service
Parameters :
|
Public addMaximality | ||||||||||||||||||||
addMaximality(label: string, maximality: number, min: number, max: number)
|
||||||||||||||||||||
Add maximality percentage to the label.
Parameters :
Returns :
string
A formatted label. |
Public addSignificance | ||||||||||||||||
addSignificance(label: string, significance: number, length: number)
|
||||||||||||||||
Add significance percentage to the label.
Parameters :
Returns :
string
A formatted label. |
Public calcFrequencies | |||||||||||||||||||||||||
calcFrequencies(collection: any, propertyName: string, splitter: string, ai: boolean)
|
|||||||||||||||||||||||||
Preprocesses and then calculates the frequency of occurrence of any value parts in a collection objects' property based on a splitter character/string. For a given object property name in the collection of objects, extracts the values, concatenates them and then calculates the frequency of occurrence of any value parts based on the splitter character/string. and lightness value when rendered.
Parameters :
Returns :
[]
An array of key/value pairs of value part and an object containing its statistics including count, percentage and lightness value when rendered. |
Public getLabel | ||||||||||||
getLabel(i: string, count: string)
|
||||||||||||
Label callback.
Parameters :
Returns :
string
A formatted label. |
Public getShortLabel | ||||||||||||||||
getShortLabel(i: string, count: string, significance: number)
|
||||||||||||||||
Short label callback (for display in charts).
Parameters :
Returns :
string
A formatted short label. |
Public replaceAll |
replaceAll(str: string, search: string | RegExp, replacement: any)
|
Replace all delegate.
Returns :
string
|