@dbvis/vd-scatterplot > "vd-scatterplot" > VdScatterplot
VdScatterplot
- alignData
- observeHoverBrush
- observeSelectionBrush
- resize
- sendHover
- sendSelection
- setCluster
- setData
- setOptions
- updateTitle
⊕ new VdScatterplot(rootElement: HTMLElement
, options: VdScatterplotOptions): VdScatterplot
Defined in vd-scatterplot.ts:90
Constructor of a VdScatterplot element.
Parameters:
Param | Type | Description |
---|---|---|
rootElement | HTMLElement |
- |
options | VdScatterplotOptions |
Returns: VdScatterplot
▸ alignData(targetData: DataItem[]): void
Defined in vd-scatterplot.ts:259
This function is intended to adjust the scatterplot to given target data in the following sense: when having plots of data items with same id but of different projections, the x- and y-axes of the scatterplot at hand are flipped if this leads to a smaller (euclidean) distance between the data items. For example, this will cause scatterplots of a pca and mds to have the same shape which makes them better comparable.
Parameters:
Param | Type | Description |
---|---|---|
targetData | DataItem[] |
Returns: void
▸ observeHoverBrush(): Observable
<VdScatterplotEvent>
Defined in vd-scatterplot.ts:146
Get observation of hovering a data item.
Returns: Observable
<VdScatterplotEvent>
▸ observeSelectionBrush(): Observable
<VdScatterplotEvent>
Defined in vd-scatterplot.ts:130
Get observation of selecting a group of data items.
Returns: Observable
<VdScatterplotEvent>
▸ resize(newWidth: number
, newHeight: number
): void
Defined in vd-scatterplot.ts:247
Resizes the height and width of plot.
Parameters:
Param | Type |
---|---|
newWidth | number |
newHeight | number |
Returns: void
▸ sendHover(scatterplotEvent: VdScatterplotEvent): void
Defined in vd-scatterplot.ts:138
Send the data item that was hovered to observers.
Parameters:
Param | Type | Description |
---|---|---|
scatterplotEvent | VdScatterplotEvent |
Returns: void
▸ sendSelection(scatterplotEvent: VdScatterplotEvent): void
Defined in vd-scatterplot.ts:122
Send selection of a group of dataitems to observers.
Parameters:
Param | Type | Description |
---|---|---|
scatterplotEvent | VdScatterplotEvent |
Returns: void
▸ setCluster(cluster: ClusterItem[]): void
Defined in vd-scatterplot.ts:168
Set the cluster for the scatterplot. All item ids related to a cluster have to be contained in the data of the scatterplot.
Parameters:
Param | Type | Description |
---|---|---|
cluster | ClusterItem[] |
Returns: void
▸ setData(data: DataItem[]): void
Defined in vd-scatterplot.ts:154
Set data for the scatterplot.
Parameters:
Param | Type | Description |
---|---|---|
data | DataItem[] |
Returns: void
▸ setOptions(options: VdScatterplotOptions): void
Defined in vd-scatterplot.ts:199
Set/Change options externally from constructor. NOTE: If voronoi cells are activated, there is no brush/group selection possible.
Parameters:
Param | Type | Description |
---|---|---|
options | VdScatterplotOptions |
Returns: void
▸ updateTitle(title: string
): void
Defined in vd-scatterplot.ts:299
Add a title to the scatterplot below the diagram.
Parameters:
Param | Type | Description |
---|---|---|
title | string |
Returns: void