Class: Instants

Instants(data, options)

An Instants visual is a set of vertical lines that are placed at certain times based on the data. Each instant can have its own label.

Constructor

new Instants(data, options)

Create an instants visual.
Parameters:
Name Type Description
data Array.<Object> An array of data.
options Object Configuration options.
Author:
  • Lawrence Fyfe
Source:

Methods

addProperty(name, value)

Add the specified property to this visual. The property is stored as [name, value].
Parameters:
Name Type Description
name string The name of the property.
value string The value of the property.
Source:

appendData(data)

Append the provided data array to the existing data array in this visual.
Parameters:
Name Type Description
data Array The data array to append.
Source:

canDeleteTime(baseTime, deltaTime)

Determines whether time in the specified time range can be deleted.
Parameters:
Name Type Description
baseTime number The start of the selection.
deltaTime number The end of the selection.
Source:

deleteTime(baseTime, deltaTime)

Deletes time based on the specified selection range.
Parameters:
Name Type Description
baseTime number The start of the selection.
deltaTime number The end of the selection.
Source:

delineate(dx, pointerX, pointerY, callDrawopt)

Edit values for points by moving the mouse.
Parameters:
Name Type Attributes Default Description
dx number Delta x.
pointerX number Pointer x.
pointerY number Pointer y.
callDraw boolean <optional>
true Whether to call draw() from this method.
Source:

draw()

Draw this visual.
Source:

drawAllLabels(filteredData)

Draw label for all instants.
Parameters:
Name Type Description
filteredData Object Filtered data with labels.
Source:

drawLabel(x, value)

Draw the label for an instant.
Parameters:
Name Type Description
x number The x value.
value string The label.
Source:

drawTimeInstants(data)

Draw time instants using the specified data. Values provided in the data are ignored.
Parameters:
Name Type Description
data object The data.
Source:

drawTimeValueInstants(data)

Draw time and value instants using the specified data.
Parameters:
Name Type Description
data object The data.
Source:

drawTimeValueRangeInstants(data)

Draw time and value range instants using the specified data.
Parameters:
Name Type Description
data object The data.
Source:

erase()

Erase this visual.
Source:

eraseLabel()

Erase all labels.
Source:

includeVisual(visualType, options)

Include the visual type indicated by the type string with the specified options.
Parameters:
Name Type Description
visualType string The visual type.
options object Options for the visual type.
Source:

initialize(parentElement, width, height, timeScale)

Initialize this visual.
Parameters:
Name Type Description
parentElement Element The parent element.
width number The parent width.
height number The parent height.
timeScale d3.scaleLinear The time scale.
Source:

insertTime(baseTime, deltaTime)

Inserts time based on the specified selection range.
Parameters:
Name Type Description
baseTime number The start of the selection.
deltaTime number The end of the selection.
Source:

timeFilterData()

Filter the data using the domain values for the time scale.
Source:

valueToOpacity(value)

Convert the specified value to an opacity based on the value domain and the min and max opacity values.
Parameters:
Name Type Description
value number A number value.
Source: