Module: LineLayer

This layer is used to render straight or smoothed line paths. The mark type of this layer is ```line```.
Source:

Methods

(static) defaultConfig() → {Object}

Default configuration of line layer
Source:
Returns:
Default configuration of layer
Type
Object

dehighlightPoint(selectionSet, config) → {BarLayer}

Removes selection styles to the elements that fall within the selection set.
Parameters:
Name Type Description
selectionSet Array Array of tuple ids.
config Object Configuration for selection.
Source:
Returns:
Instance of bar layer.
Type
BarLayer

getDrawFn() → {function}

Returns the draw method for line
Source:
Returns:
Draw method of line layer
Type
function

getNearestPoint(x, y) → {Object}

Gets the nearest point closest to the given position
Parameters:
Name Type Description
x number x position
y number y position
Source:
Returns:
Nearest point information
Type
Object

getPathStyle(color) → {Object}

Get the css styles need to be applied on the line path
Parameters:
Name Type Description
color string Color value
Source:
Returns:
Path styles
Type
Object

highlightPoint(selectionSet, config) → {BarLayer}

Applies selection styles to the elements that fall within the selection set.
Parameters:
Name Type Description
selectionSet Array Array of tuple ids.
config Object Configuration for selection.
Source:
Returns:
Instance of bar layer.
Type
BarLayer

render(container) → {LineLayer}

Renders the line plot
Parameters:
Name Type Description
container SVGElement svg element
Source:
Returns:
instance of line layer
Type
LineLayer

translatePoints(data, encoding, axes, seriesIndex) → {Array}

Generates the x and y positions for each point
Parameters:
Name Type Description
data Array Data Array
encoding Object Visual Encodings of the layer
axes Object Contains the axis
seriesIndex number index of series
Source:
Returns:
Array of points
Type
Array