Methods
handleFunction(newValue)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
newValue |
String
|
MaxEvolution(data) → {Object}
Find the object with the highest evolution over a year
- Source:
Parameters:
Name | Type | Description |
---|---|---|
data |
Array.<Object>
|
Array of object to compare |
Returns:
- Type:
-
Object
Object with the highest 'diff' value
MostCentral(data, year) → {Object}
Find the most central object
- Source:
Parameters:
Name | Type | Description |
---|---|---|
data |
Array.<Object>
|
Array of object to compare |
year |
year
|
The year of compared values |
Returns:
- Type:
-
Object
Most Central object
Omit(obj, omitKey) → {Object}
Remove key in Object
- Source:
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object
|
Object to modify |
omitKey |
Any
|
key to remove from object |
Returns:
- Type:
-
Object
Object with the key removed
OrderColors(names, selectedColors) → {Array.<String>}
Assigns a color to a name
- Source:
Parameters:
Name | Type | Description |
---|---|---|
names |
Array.<String>
|
Array of names |
selectedColors |
Array.<String>
|
Array of corresponding colors |
Returns:
- Type:
-
Array.<String>
Array of strings with corresponding colors
OrderColorsRGBA(names, selectedColors, name1, name2, alpha) → {Array.<String>}
Assigns RGB & RGBA colors to a name with 2 variables (e.g. ingoing/outgoing)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
names |
Array.<String>
|
Array of names |
selectedColors |
Array.<String>
|
Array of corresponding colors |
name1 |
String
|
Name of the first variable to return |
name2 |
String
|
Name of the second variable to return |
alpha |
String
|
Alpha value for the transparency of the RGBA color. |
Returns:
- Type:
-
Array.<String>
Array of strings with corresponding colors
PascalCase(str) → {String}
Transform a string to PascalCase convention
- Source:
Parameters:
Name | Type | Description |
---|---|---|
str |
String
|
String to transform |
Returns:
- Type:
-
String
Transformed string
RandomIndex(key, max, selectedValues) → {Object}
Generate random value not present in array according a given key
- Source:
Parameters:
Name | Type | Description |
---|---|---|
key |
String
|
key to randomize |
max |
Number
|
max value random generator |
selectedValues |
Array.<Number>
|
index already use |
Returns:
- Type:
-
Object
Object with the key removed
SaveAs(uri, filename)
Create an object to save uri link into file
- Source:
Parameters:
Name | Type | Description |
---|---|---|
uri |
String
|
Uri link to download |
filename |
String
|
Name of the file |