Class: module:BarLayer

module:BarLayer()

new module:BarLayer()

Creates an instance of bar layer
Source:

Methods

(static) defaultConfig() → {Object}

Returns the default configuration of the bar layer
Source:
Returns:
Default configuration of the bar layer
Type
Object

getNearestPoint(x, y) → {Object}

Gets the nearest point of the position passed.
Parameters:
Name Type Description
x number x position
y number y position
Source:
Returns:
Nearest point.
Type
Object

render(container) → {BarLayer}

Renders the plot in the given container
Parameters:
Name Type Description
container SVGGroup SVGGroup where plot will be rendered.
Source:
Returns:
Instance of bar layer.
Type
BarLayer

translatePoints(data, encoding, axes, conf) → {Array.<Object>}

Generates an array of objects containing x, y, width and height of the bars from the data
Parameters:
Name Type Description
data Array.<Array> Data Array
encoding Object Config
axes Object Axes object
conf Object config object for point generation
Source:
Returns:
Array of points
Type
Array.<Object>