Utility functions for charts
- Source:
Methods
(private, static) asMilliseconds(string) → {number}
Converts a string formated time duration to milliseconds
Parameters:
Name | Type | Description |
---|---|---|
string | string | A string like '1s' or '60s' |
- Source:
Returns:
- Type
- number
(private, static) max(arr) → {number}
Returns the highest number in an array
Parameters:
Name | Type | Description |
---|---|---|
arr | array |
- Source:
Returns:
- Type
- number
(private, static) min(arr) → {number}
Returns the lowest number in an array
Parameters:
Name | Type | Description |
---|---|---|
arr | array |
- Source:
Returns:
- Type
- number
(private, static) parse(data) → {array}
Parse a string formated as array into array
Parameters:
Name | Type | Description |
---|---|---|
data | string |
- Source:
Returns:
- Type
- array
(private, static) sum(arr) → {number}
Returns the sum of all values in an array
Parameters:
Name | Type | Description |
---|---|---|
arr | array |
- Source:
Returns:
- Type
- number