new DateAxis(elementId)
Wrapper class to make it easier to work with a date axis.
Parameters:
| Name | Type | Description |
|---|---|---|
elementId |
string | the DOM element ID for the container div holding the date axis |
- Source:
Methods
addAxisChangeListener(listener)
Adds the given function as an axis change listener. Does nothing if the given
listener is not a
function.
Parameters:
| Name | Type | Description |
|---|---|---|
listener |
axisChangeListenerFunction | function for handling an AxisChangeEvent. |
- Source:
clearMinRangeConstraints()
Clears the min range constraints by setting bounds to [
-1 * Number.MAX_VALUE,
Number.MAX_VALUE].
- Source:
clearRangeConstraints()
Clears the range constraints by setting bounds to [
-1 * Number.MAX_VALUE, Number.MAX_VALUE].
- Source:
constrainMinRangeTo(rangeOrMinTimeSecs, maxTimeSecsopt)
Constrains the range of the axis so that the user cannot pan/zoom deeper than the specified range.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
rangeOrMinTimeSecs |
AxisRange | number | null | an AxisRange a double representing the minimum time
in Unix time seconds of the time range. If null, undefined, non-numeric, or not an
AxisRange, then -1*Number.MAX_VALUE is used instead. |
|
maxTimeSecs |
number | null |
<optional> |
a double representing the maximum time in Unix time seconds of the time
range. If null, undefined, or non-numeric, then Number.MAX_VALUE is used instead. |
- Source:
constrainRangeTo(rangeOrMinTimeSecs, maxTimeSecsopt)
Constrains the range of the axis so that the user cannot pan/zoom outside the specified range.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
rangeOrMinTimeSecs |
AxisRange | number | an AxisRange a double representing the minimum time in
Unix time seconds of the time range. If null, undefined, non-numeric, or not an
AxisRange, then -1*Number.MAX_VALUE is used instead. |
|
maxTimeSecs |
number |
<optional> |
a double representing the maximum time in Unix time seconds of the time range. If
null, undefined, or non-numeric, then Number.MAX_VALUE is used instead. |
- Source:
getCursorPosition() → {number}
Returns the current cursor position.
- Source:
Returns:
- Type
- number
getElementId() → {string}
Returns the DOM element ID for the container div holding this axis.
- Source:
Returns:
- Type
- string
getRange() → {AxisRange}
Returns the date axis's current range as and object containing
mine and max fields.
- Source:
Returns:
- Type
- AxisRange
getWidth() → {int}
Returns the width of the DateAxis's container div.
- Source:
Returns:
the width of the DateAxis's container div
- Type
- int
getWrappedAxis() → {DateAxis}
Returns the wrapped
DateAxis object.
- Source:
Returns:
- Type
- DateAxis
hideCursor()
Hides the cursor. This is merely a helper method, identical to calling
setCursorPosition(null).
- Source:
removeAxisChangeListener(listener)
Removes the given axis change listener. Does nothing if the given
listener is not a function.
Parameters:
| Name | Type | Description |
|---|---|---|
listener |
axisChangeListenerFunction | function for handling an AxisChangeEvent. |
- Source:
setCursorColor(colorDescriptor)
Sets the cursor to the color described by the given
colorDescriptor, or to black if the given
colorDescriptor is undefined, null, or invalid. The color descriptor can be any valid
CSS color descriptor such as a word ("green", "blue", etc.), a hex color (e.g. "#ff0000"), or an RGB color
(e.g. "rgb(255,0,0)" or "rgba(0,255,0,0.5)").
Parameters:
| Name | Type | Description |
|---|---|---|
colorDescriptor |
string | a string description of the desired color. |
- Source:
setCursorPosition(timeInSecs)
Sets the cursor position to the given
timeInSecs. The cursor is hidden if timeInSecs
is null or undefined.
Parameters:
| Name | Type | Description |
|---|---|---|
timeInSecs |
number | the time at which the cursor should be placed. |
- Source:
setRange(rangeOrMinTimeSecs, maxTimeSecsopt)
Sets the visible range of the axis.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
rangeOrMinTimeSecs |
AxisRange | number | an AxisRange or a double representing the time in Unix
time seconds of the start of the visible time range. If null, undefined, non-numeric, or not an
AxisRange, then -1*Number.MAX_VALUE is used instead. |
|
maxTimeSecs |
number |
<optional> |
a double representing the time in Unix time seconds of the end of the visible
time range. If null, undefined, or non-numeric, then Number.MAX_VALUE is used
instead. |
- Source:
setWidth(width)
Sets the width of the axis.
Parameters:
| Name | Type | Description |
|---|---|---|
width |
int | the new width |
- Source: