Class: Legend

Legend(dependencies)

new Legend(dependencies)

Creates a Legend from the axes of a canvas
Parameters:
Name Type Description
dependencies Object : legend data
Source:

Classes

module.exports

Members

(static, constant) exports.computeItemSpaces

Source:

(static, constant) exports.createAxis

Creates an axis cell with a linear axis for computing space and creating gradient legend
Source:

(static, constant) exports.createItemSkeleton

Creates legend item based on alignment and text orientation
Source:

(static, constant) exports.getLegendIcon

Returns the icon of the legend item
Source:

(static, constant) exports.renderAxis

Renders the axis for the gradient
Source:

(static, constant) exports.renderDiscreteItem

Renders the items in the legend i.e, icon and text
Source:

(static, constant) exports.renderStepItem

Renders the items in the legend i.e, icon and text
Source:

Methods

(static) create(dependencies) → {Instance}

Initializes an instance of the class
Parameters:
Name Type Description
dependencies Object Set of dependencies required by the legend
Source:
Returns:
returns a new instance of Legend
Type
Instance

(static) create(dependencies) → {Instance}

Initializes an instance of the class
Parameters:
Name Type Description
dependencies Object Set of dependencies required by the legend
Source:
Returns:
returns a new instance of Legend
Type
Instance

(static) create(dependencies) → {Instance}

Initializes an instance of the class
Parameters:
Name Type Description
dependencies Object Set of dependencies required by the legend
Source:
Returns:
returns a new instance of Legend
Type
Instance

(static) create(dependencies) → {Instance}

Initializes an instance of the class
Parameters:
Name Type Description
dependencies Object Set of dependencies required by the legend
Source:
Returns:
returns a new instance of Legend
Type
Instance

(static) elemType()

Source:

(static) elemType()

Source:

(static) getLabelSpaces(effPadding, align)

Parameters:
Name Type Description
effPadding *
align *
Source:

(static) getLabelSpaces(effPadding, align)

Parameters:
Name Type Description
effPadding *
align *
Source:

(static) getLabelSpaces(effPadding, align)

Parameters:
Name Type Description
effPadding *
align *
Source:

(static) getTitleSpace() → {Object}

Returns the space occupied by the legend title
Source:
Returns:
Space occupied by title
Type
Object

(static) mount()

Source:

(static) render(mountPoint) → {Instance}

Render the legend with its title
Parameters:
Name Type Description
mountPoint DOM Point where the legend and title are to be appended
Source:
Returns:
Current instance of legend
Type
Instance

(static) render(mountPoint) → {Instance}

Render the legend with its title
Parameters:
Name Type Description
mountPoint DOM Point where the legend and title are to be appended
Source:
Returns:
Current instance of legend
Type
Instance

(static) render(mountPoint) → {Instance}

Render the legend with its title
Parameters:
Name Type Description
mountPoint DOM Point where the legend and title are to be appended
Source:
Returns:
Current instance of legend
Type
Instance

(static) render(mountPoint) → {Instance}

Render the legend with its title
Parameters:
Name Type Description
mountPoint DOM Point where the legend and title are to be appended
Source:
Returns:
Current instance of legend
Type
Instance

(static) renderTitle(container) → {Selection}

Creates the title for the legend
Parameters:
Name Type Description
container DOM Container made for the title
Source:
Returns:
Title and it's node
Type
Selection

(static) setLegendMeasures() → {Instance}

Sets the height and width of a legend based on provided max height and width and based on its contents
Source:
Returns:
Current instance
Type
Instance

Legend(dependencies)

new Legend(dependencies)

Creates a Legend from the axes of a canvas
Parameters:
Name Type Description
dependencies Object : legend data
Source:

Classes

module.exports

Members

(static, constant) exports.computeItemSpaces

Source:

(static, constant) exports.createAxis

Creates an axis cell with a linear axis for computing space and creating gradient legend
Source:

(static, constant) exports.createItemSkeleton

Creates legend item based on alignment and text orientation
Source:

(static, constant) exports.getLegendIcon

Returns the icon of the legend item
Source:

(static, constant) exports.renderAxis

Renders the axis for the gradient
Source:

(static, constant) exports.renderDiscreteItem

Renders the items in the legend i.e, icon and text
Source:

(static, constant) exports.renderStepItem

Renders the items in the legend i.e, icon and text
Source:

Methods

(static) create(dependencies) → {Instance}

Initializes an instance of the class
Parameters:
Name Type Description
dependencies Object Set of dependencies required by the legend
Source:
Returns:
returns a new instance of Legend
Type
Instance

(static) create(dependencies) → {Instance}

Initializes an instance of the class
Parameters:
Name Type Description
dependencies Object Set of dependencies required by the legend
Source:
Returns:
returns a new instance of Legend
Type
Instance

(static) create(dependencies) → {Instance}

Initializes an instance of the class
Parameters:
Name Type Description
dependencies Object Set of dependencies required by the legend
Source:
Returns:
returns a new instance of Legend
Type
Instance

(static) create(dependencies) → {Instance}

Initializes an instance of the class
Parameters:
Name Type Description
dependencies Object Set of dependencies required by the legend
Source:
Returns:
returns a new instance of Legend
Type
Instance

(static) elemType()

Source:

(static) elemType()

Source:

(static) getLabelSpaces(effPadding, align)

Parameters:
Name Type Description
effPadding *
align *
Source:

(static) getLabelSpaces(effPadding, align)

Parameters:
Name Type Description
effPadding *
align *
Source:

(static) getLabelSpaces(effPadding, align)

Parameters:
Name Type Description
effPadding *
align *
Source:

(static) getTitleSpace() → {Object}

Returns the space occupied by the legend title
Source:
Returns:
Space occupied by title
Type
Object

(static) mount()

Source:

(static) render(mountPoint) → {Instance}

Render the legend with its title
Parameters:
Name Type Description
mountPoint DOM Point where the legend and title are to be appended
Source:
Returns:
Current instance of legend
Type
Instance

(static) render(mountPoint) → {Instance}

Render the legend with its title
Parameters:
Name Type Description
mountPoint DOM Point where the legend and title are to be appended
Source:
Returns:
Current instance of legend
Type
Instance

(static) render(mountPoint) → {Instance}

Render the legend with its title
Parameters:
Name Type Description
mountPoint DOM Point where the legend and title are to be appended
Source:
Returns:
Current instance of legend
Type
Instance

(static) render(mountPoint) → {Instance}

Render the legend with its title
Parameters:
Name Type Description
mountPoint DOM Point where the legend and title are to be appended
Source:
Returns:
Current instance of legend
Type
Instance

(static) renderTitle(container) → {Selection}

Creates the title for the legend
Parameters:
Name Type Description
container DOM Container made for the title
Source:
Returns:
Title and it's node
Type
Selection

(static) setLegendMeasures() → {Instance}

Sets the height and width of a legend based on provided max height and width and based on its contents
Source:
Returns:
Current instance
Type
Instance

Legend(dependencies)

new Legend(dependencies)

Creates a Legend from the axes of a canvas
Parameters:
Name Type Description
dependencies Object : legend data
Source:

Classes

module.exports

Members

(static, constant) exports.computeItemSpaces

Source:

(static, constant) exports.createAxis

Creates an axis cell with a linear axis for computing space and creating gradient legend
Source:

(static, constant) exports.createItemSkeleton

Creates legend item based on alignment and text orientation
Source:

(static, constant) exports.getLegendIcon

Returns the icon of the legend item
Source:

(static, constant) exports.renderAxis

Renders the axis for the gradient
Source:

(static, constant) exports.renderDiscreteItem

Renders the items in the legend i.e, icon and text
Source:

(static, constant) exports.renderStepItem

Renders the items in the legend i.e, icon and text
Source:

Methods

(static) create(dependencies) → {Instance}

Initializes an instance of the class
Parameters:
Name Type Description
dependencies Object Set of dependencies required by the legend
Source:
Returns:
returns a new instance of Legend
Type
Instance

(static) create(dependencies) → {Instance}

Initializes an instance of the class
Parameters:
Name Type Description
dependencies Object Set of dependencies required by the legend
Source:
Returns:
returns a new instance of Legend
Type
Instance

(static) create(dependencies) → {Instance}

Initializes an instance of the class
Parameters:
Name Type Description
dependencies Object Set of dependencies required by the legend
Source:
Returns:
returns a new instance of Legend
Type
Instance

(static) create(dependencies) → {Instance}

Initializes an instance of the class
Parameters:
Name Type Description
dependencies Object Set of dependencies required by the legend
Source:
Returns:
returns a new instance of Legend
Type
Instance

(static) elemType()

Source:

(static) elemType()

Source:

(static) getLabelSpaces(effPadding, align)

Parameters:
Name Type Description
effPadding *
align *
Source:

(static) getLabelSpaces(effPadding, align)

Parameters:
Name Type Description
effPadding *
align *
Source:

(static) getLabelSpaces(effPadding, align)

Parameters:
Name Type Description
effPadding *
align *
Source:

(static) getTitleSpace() → {Object}

Returns the space occupied by the legend title
Source:
Returns:
Space occupied by title
Type
Object

(static) mount()

Source:

(static) render(mountPoint) → {Instance}

Render the legend with its title
Parameters:
Name Type Description
mountPoint DOM Point where the legend and title are to be appended
Source:
Returns:
Current instance of legend
Type
Instance

(static) render(mountPoint) → {Instance}

Render the legend with its title
Parameters:
Name Type Description
mountPoint DOM Point where the legend and title are to be appended
Source:
Returns:
Current instance of legend
Type
Instance

(static) render(mountPoint) → {Instance}

Render the legend with its title
Parameters:
Name Type Description
mountPoint DOM Point where the legend and title are to be appended
Source:
Returns:
Current instance of legend
Type
Instance

(static) render(mountPoint) → {Instance}

Render the legend with its title
Parameters:
Name Type Description
mountPoint DOM Point where the legend and title are to be appended
Source:
Returns:
Current instance of legend
Type
Instance

(static) renderTitle(container) → {Selection}

Creates the title for the legend
Parameters:
Name Type Description
container DOM Container made for the title
Source:
Returns:
Title and it's node
Type
Selection

(static) setLegendMeasures() → {Instance}

Sets the height and width of a legend based on provided max height and width and based on its contents
Source:
Returns:
Current instance
Type
Instance