Class: VisualPane

VisualPane(options)

A visual pane.

Constructor

new VisualPane(options)

Create an visual pane.
Parameters:
Name Type Description
options Object Options for this pane.
Author:
  • Lawrence Fyfe
Source:

Methods

activate()

Activate this pane, allowing it to accept pointer events.
Source:

addVisual(visual, panel)

Add a visual to this pane.
Parameters:
Name Type Description
visual visual The visual to add.
panel VisualPanel An optional panel to associate with this visual.
Source:

addVisuals(visuals, panel)

Add an array of visuals to this pane.
Parameters:
Name Type Description
visuals Array The array of visuals to add.
panel VisualPanel An optional panel to associate with these visuals.
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:

clearVisuals()

Clear all visuals in the pane.
Source:

createCurve(data, options, panel)

Create a Curve visual based on the provided data and add it to this pane.
Parameters:
Name Type Description
data Object The data.
options Object Optional options.
panel VisualPanel An optional panel to associate with this visual.
Source:

createInstants(data, options, panel)

Create an Instants visual based on the provided data and add it to this pane.
Parameters:
Name Type Description
data Object The data.
options Object Optional options.
panel VisualPanel An optional panel to associate with this visual.
Source:

createNotes(data, options, panel)

Create a Notes visual based on the provided data and add it to this pane.
Parameters:
Name Type Description
data Object The data.
options Object Optional options.
panel VisualPanel An optional panel to associate with this visual.
Source:

createPoints(data, options, panel)

Create a Points visual based on the provided data and add it to this pane.
Parameters:
Name Type Description
data Object The data.
options Object Optional options.
panel VisualPanel An optional panel to associate with this visual.
Source:

deactivate()

Deactivate this pane, preventing it from accepting pointer events.
Source:

deleteTime(baseTime, deltaTime)

Deletes time based on the specified time range but only if no elements are in that time range.
Parameters:
Name Type Description
baseTime number The start of the selection.
deltaTime number The end of the selection.
Source:

draw()

Draw this VisualPane and any visuals it contains.
Source:

drawPanel()

Draw the panel associated with this pane.
Source:

drawVisualType(type)

Draw visuals of the specified type.
Parameters:
Name Type Description
type string The type of the visuals.
Source:

erase()

Erase this VisualPane.
Source:

eraseAllVisuals()

Erase all visuals from this pane.
Source:

erasePanel()

Erase the panel associated with this pane.
Source:

eraseVisualType(type)

Erase visuals of the specified type from this pane.
Parameters:
Name Type Description
type string The type of the visuals.
Source:

generateCurve(data, options) → {Curve}

Generate a Curve visual based on the provided data and return it.
Parameters:
Name Type Description
data Object The data.
options Object Optional options.
Source:
Returns:
A new Curve or undefined if there is no data.
Type
Curve

generateInstants(data, options) → {Instants}

Generate an Instants visual based on the provided data and return it.
Parameters:
Name Type Description
data Object The data.
options Object Optional options.
Source:
Returns:
A new Instants or undefined if there is no data.
Type
Instants

generateNotes(data, options) → {Notes}

Generate a Notes visual based on the provided data and return it.
Parameters:
Name Type Description
data Object The data.
options Object Optional options.
Source:
Returns:
A new Notes visual.
Type
Notes

generatePoints(data, options) → {Points}

Generate a Points visual based on the provided data and return it.
Parameters:
Name Type Description
data Object The data.
options Object Optional options.
Source:
Returns:
A new Points visual.
Type
Points

getVisualType(type) → {Array}

Get the specified visual type and an array of visuals.
Parameters:
Name Type Description
type string The type of visual.
Source:
Returns:
An array of visuals or undefined if no visuals are found.
Type
Array

getVisuals() → {Array}

Get the visuals associated with this pane and return them in an array.
Source:
Returns:
An array of visuals.
Type
Array

hasVisualType(type) → {boolean}

Determine whether this pane contains visuals of the specified type.
Parameters:
Name Type Description
type string The type of visual.
Source:
Returns:
True if this pane contains the type; false otherwise.
Type
boolean

initialize(parentElement, width, height, timeScale)

Initialize this VisualPane.
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:

initializePanel(panelElement)

Initialize the panel associated with this pane and attach it to the specified element.
Parameters:
Name Type Description
panelElement element The element that will contain the panel.
Source:

insertTime(baseTime, deltaTime)

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

lower()

Lower this pane to the bottom of the list of panes in its containing TimeFrame.
Source:

lowerVisual(visual)

Lowers the specified visual such that it will be drawn under all other visuals.
Parameters:
Name Type Description
visual visual The visual to lower.
Source:

raise()

Raise this pane to the top of the list of panes in its containing TimeFrame.
Source:

raiseVisual(visual)

Raises the specified visual such that it will be drawn over all other visuals.
Parameters:
Name Type Description
visual visual The visual to raise.
Source:

removeVisual(visualToRemove, panel)

Remove a visual from this pane.
Parameters:
Name Type Description
visualToRemove visual The visual to remove.
panel VisualPanel An optional panel to remove.
Source:

removeVisualType(type)

Remove visuals of the specified type from this pane.
Parameters:
Name Type Description
type string The type to remove.
Source:

setBaseSize()

Takes the current width and height (set with initialize()) and sets them as a base size. This is particularly useful for situations in which this VisualPane is being resized but the visuals themselves are set to maintain their size via the the resizeVisuals boolean being set to false.
Source:

setVisualTypeOn(type, on)

Change the display indicator of the specified visual type to on or off. Note that setting visuals to off with this method does not erase them and setting them to on does not draw them. This method just changes the value of the display indicator to on or off for a later erase or draw.
Parameters:
Name Type Description
type string The type of visual.
on boolean True turns the visual type on; false turns it off.
Source: