new module:VisualUnit(registry, dependencies)
Creates instance of visualization unit.
Parameters:
Name | Type | Description |
---|---|---|
registry |
Object | Component registry |
dependencies |
Object | Dependencies required by visual unit. |
- Source:
Methods
(static) create(idopt, data, layers, config) → {VisualUnit}
Static helper for creates a unit instance
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
Object |
<optional> |
optional unique identifier for a unit; , id is calculated internally |
data |
DataModel | instance of datamodel | |
layers |
Array.<Layer> | layer configuration | |
config |
Object | configurtion for the visual unit |
- Source:
Returns:
Instance of a unit
- Type
- VisualUnit
firebolt() → {Firebolt}
Returns the instance of firebolt associated with this visual unit. Firebolt dispatches the behavioural actions
when any physical action happens on the elements of visual unit.
- Source:
Returns:
Instance of firebolt.
- Type
- Firebolt
getDataDomain() → {Object}
Gets the domain for all axes of this visual unit.
- Source:
Returns:
Domains of each data field.
- Type
- Object
getDrawingContext() → {Object}
Returns the drawing information from visual unit.Drawing context contains the dimensions of unit and the svg
container of the visual unit.
- Source:
Returns:
Drawing information.
```
{
htmlContainer: // Html container of svg container of the visual unit
svgContainer: // Root svg container
width: // Width of the visual unit
height: // Height of the visual unit
sideEffectGroup: // Svg group for drawing side effect elements.
parentContainer: // Parent html container of the visual unit.
xOffset: // x offset space from the starting x position of the container,
yOffset: // y offset space from the starting y position of the container
}
```
- Type
- Object
getNearestPoint(x, y) → {Object}
Finds the nearest point closest to the x and y position.
Parameters:
Name | Type | Description |
---|---|---|
x |
number | x position. |
y |
number | y position. |
- Source:
Returns:
Nearest point.
- Type
- Object
id() → {string}
Retrieves the id created for this instance of visual unit.
- Source:
Returns:
id associated with the instance
- Type
- string
render() → {VisualUnit}
Renders the visual unit. It creates the layout and renders the axes and layers.
- Source:
Returns:
Instance of visual unit.
- Type
- VisualUnit
serialize() → {Object}
Returns the serialized configuration of visual unit.
- Source:
Returns:
serialized configuration
- Type
- Object