Type Definitions
AxisChangeEvent
An axis change event object.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
min |
number | the axis's min value |
max |
number | the axis's max value |
cursorPosition |
number | null | the value of the cursor |
cursorPositionString |
string | null | the value of the cursor, expressed as a string |
- Source:
axisChangeListenerFunction(axisChangeEvent)
Function for handling axis change events. Note that the event object passed to the function may be
null
.
Parameters:
Name | Type | Description |
---|---|---|
axisChangeEvent |
AxisChangeEvent | null | the AxisChangeEvent , may be null |
- Source:
AxisRange
The min and max values for an axis's range.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
min |
number | the range min |
max |
number | the range max |
- Source:
DataPoint
A data point object.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
value |
number | the data point's value |
date |
number | the data point's timestamp |
valueString |
string | the data point's value, expressed as a string |
dateString |
string | the data point's timestamp, expressed as a string |
comment |
string | the comment associated with the data point, or null if no comment exists |
- Source:
dataPointListenerFunction(dataPoint)
Function for handling data point events. Note that the object passed to the function may be
null
.
Parameters:
Name | Type | Description |
---|---|---|
dataPoint |
DataPoint | null | the DataPoint |
- Source:
datasourceFunction(level, offset, successCallback)
Datasource function with signature
function(level, offset, successCallback)
resposible for
returning tile JSON for the given level
and offset
.
Parameters:
Name | Type | Description |
---|---|---|
level |
number | the tile's level |
offset |
number | the tile's offset |
successCallback |
datasourceSuccessCallbackFunction | success callback function which expects to be given the tile JSON |
- Source:
datasourceSuccessCallbackFunction(json)
The function which the datasource function will call upon success, giving it the tile JSON. Some implementations
can handle either an object or a string, some require one or the other.
Parameters:
Name | Type | Description |
---|---|---|
json |
object | string | the tile JSON, as either an object or a string |
- Source:
plotContainerIteratorFunction(plotContainer)
Function used by a PlotContainer iterator, used for performing an operation on a given PlotContainer.
Parameters:
Name | Type | Description |
---|---|---|
plotContainer |
org.bodytrack.grapher.PlotContainer | the PlotContainer object |
- Source:
PlotStatistics
The statistics about plot data within a specific time range.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
count |
number | null | number of data points in the range, may be null if unknown |
hasData |
boolean | whether there are any data points in the range |
minValue |
number | null | the minimum Y value in the range, or null (or not present in the object) if there is no data within the range. |
maxValue |
number | null | the maximum Y value in the range, or null (or not present in the object) if there is no data within the range. |
- Source:
widthCalculatorFunction() → {int}
Helper function which calculates and returns the desired width of the date axis and all plot containers managed
by this PlotManager.
- Source:
Returns:
the desired width of the date axis
- Type
- int
yAxisRangePaddingStrategyFunction(range) → {AxisRange}
Strategy function which pads the given
AxisRange
and returns a new AxisRange
.
Parameters:
Name | Type | Description |
---|---|---|
range |
AxisRange | an axis range |
- Source:
Returns:
the padded axis range
- Type
- AxisRange