Class: Region

Region(startTime, endTime, label, options, properties, active, firstCreated)

A region annotation.

Constructor

new Region(startTime, endTime, label, options, properties, active, firstCreated)

Create a region annotation.
Parameters:
Name Type Description
startTime number The start time.
endTime number The end time.
label string A label.
options Object Configuration options.
properties Object Properties.
active boolean Whether this region should be active when created.
firstCreated boolean Whether this region has just been created.
Author:
  • Lawrence Fyfe
Source:

Methods

changeCursor(mouseTime, resizeHandleTime)

Change the cursor style based in the pointer location.
Parameters:
Name Type Description
mouseTime number The time value in seconds at the pointer location.
resizeHandleTime number The size of the resize handles in seconds.
Source:

draw(parentElement, parentWidth, parentHeight, timeScale)

Draw this region 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(parentWidth, parentHeight, x)

Draw the label.
Parameters:
Name Type Description
parentWidth number The width.
parentHeight number The height.
x number The x location.
Source:

erase()

Erase this region.
Source:

eraseLabel()

Erase the label.
Source:

select(select)

Select or deselect this region.
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: