Class: VisualGroup

VisualGroup()

new VisualGroup()

VisualGroup is instantiated by canvas for creating VisualUnit and axes instances.It creates the the matrix of visual units and axes. It also creates the layout instance which manages the allocation of space of matrices. To get instance of visual group, ``` const visualGroup = canvas.composition().visualGroup; ```
Source:

Classes

VisualGroup

Members

(static, constant) exports.initStore

Creates an instance of a store which contains the arguments to make the class reactive
Source:

Methods

(static) setMatrixInstances(placeholder)

Parameters:
Name Type Description
placeholder *
Source:

composition() → {Object}

Returns the composition of visual group.
Source:
Returns:
Composition of visual group. It contains instance of matrices ValueMatrix and instances of axis. ``` { matrices: { value: // Instance of center value matrix. left: // Instance of left value matrix right: // Instance of right value matrix bottom: // Instance of bottom value matrix top: // Instance of top value matrix. }, axes: { x: // Array of x axis. y: // Array of y axis color: // Array of color axis shape: // Array of shape axis size: // Array of size axis. } } ```
Type
Object

getAxes(type) → {Array}

Gets the axis instances of the visual group based on the given axis type.
Parameters:
Name Type Description
type string Type of axis. X,Y or retinal axes.
Source:
Returns:
Array of axis instances.
Type
Array

getCells() → {Array}

Returns the instances of cells based on the given type. Type can be given as `row' or `col`.
Source:
Returns:
Two dimensional array of cells.
Type
Array

getGroupByData() → {DataModel}

Returns the grouped datamodel prepared by visual group. If there is no group by performed, then it returns the original data model passed to visual group.
Source:
Returns:
Grouped data model.
Type
DataModel

lockModel() → {Object}

Locks the model to prevent change listeners to be triggered until unlocked
Source:
Returns:
Instance of class VisualGroup
Type
Object

matrixInstance() → {Object}

Return the instances of matrices created by the visual group.
Source:
Returns:
Instance of matrices.
Type
Object

serialize() → {Object}

This method is used to return a serialized representation of the instance's properties.
Source:
Returns:
Object with config proprties.
Type
Object

unlockModel() → {Object}

Unlocks the model so that all change listeners can be triggered
Source:
Returns:
Instance of class VisualGroup
Type
Object

where(variable) → {string}

Returns the channel name of the variable. Channels are rows, columns, color, shape and size.
Parameters:
Name Type Description
variable string Name of the variable.
Source:
Returns:
Name of the channel.
Type
string