Constructor
new Marker(time, label, options, properties, active, firstCreated)
Create a marker annotation.
Parameters:
| Name | Type | Description |
|---|---|---|
time |
number | The time. |
label |
string | A label. |
options |
Object | Configuration options. |
properties |
Object | Properties. |
active |
boolean | Whether this marker should be active when created. |
firstCreated |
boolean | Whether this marker has just been created. |
- Source:
Methods
draw(parentElement, parentWidth, parentHeight, timeScale)
Draw this marker with the specified parameters from the containing pane.
Parameters:
| Name | Type | Description |
|---|---|---|
parentElement |
d3.selection | The parent element. |
parentWidth |
number | The width. |
parentHeight |
number | The height. |
timeScale |
d3.scaleLinear | The time scale. |
- Source:
drawLabel(parentElement, parentWidth, parentHeight)
Draw the label.
Parameters:
| Name | Type | Description |
|---|---|---|
parentElement |
d3.selection | The parent element. |
parentWidth |
number | The width. |
parentHeight |
number | The height. |
- Source:
erase()
Erase this marker.
- Source:
eraseLabel()
Erase the label.
- Source:
getTime() → {number}
Get the time.
- Source:
Returns:
The time.
- Type
- number
move(parentWidth, moveX)
Move this marker by the specified amount.
Parameters:
| Name | Type | Description |
|---|---|---|
parentWidth |
number | The maximum value for the x location. |
moveX |
number | The change in the x location. |
- Source:
select(select)
Select or deselect this marker.
Parameters:
| Name | Type | Description |
|---|---|---|
select |
boolean | If true, select; otherwise deselect. |
- Source:
setLabel(label)
Set the label string.
Parameters:
| Name | Type | Description |
|---|---|---|
label |
string | The label. |
- Source: