Cluster definition element for distance based clusters. Visual objects are clustered based on the visible distance between them. Objects get aggregated to a cluster object as long as they are inside the given distance range to the start object. The start object for a cluster is not specifically defined, just the next object not belonging to a cluster is taken. The visualization objects are placed in the center of gravity of the covered objects. Thus the actual distance between them may vary.
This clustering is fast, but the results may not be very convincing.
Constructor for a new ClusterDistance.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui.vbm.ClusterDistance(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | id for the new control, generated automatically if no id is given |
|
mSettings? | object | initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
distance | int | 128 | Distance in pixels between cluster objects. This distance is used as parameter during the clustering. The visualization objects are placed in center of gravity of the covered objects. Thus the actual distance between them may vary. Visibility: public |
Name | Type | Default Value | Description |
---|---|---|---|
areaAlwaysVisible | boolean | false | Flag controlling the visibility of the area convered by a cluster object. Visibility: public |
areaColor | sap.ui.core.CSSColor | rgba(200,0,0,0.2) | Fill color for the area covered by a cluster object Visibility: public |
areaColorBorder | sap.ui.core.CSSColor | rgba(220,220,220,0.5) | Border color for the area covered by a cluster object Visibility: public |
rule | string | Clustering rule, describing which visual objects should be considered for clustering Visibility: public |
|
textProperty | string | text | Name of property of the visualization control receiving the number of clustered objects. This setting applys only if aggregation vizTemplate is used. Visibility: public |
textSettings | object | Settings for the text placed on the given Spot telling the number of clustered objects. This setting applys only if aggregation vizVo is used. If omitted the number of clustered object will not be shown! Visibility: public |
Name | Cardinality | Type | Description |
---|---|---|---|
clusterContainers | 0..n | sap.ui.vbm.ClusterContainer |
Hidden aggregation for host container VOs |
clusterVos | 0..n | sap.ui.core.Control |
Hidden aggregation for cluster visualization controls |
vizTemplate | 0..1 | sap.ui.core.Control |
Optional: Instance of a control, which is used as template for visualizing cluster objects. This is the prefered choise. |
vizVo | 0..1 | sap.ui.vbm.Spot |
Optional: Instance of a spot, which is used as template for visualizing cluster objects |
Method | Description |
---|---|
sap.ui.vbm.ClusterDistance.extend |
Creates a new subclass of class sap.ui.vbm.ClusterDistance with name
|
getDistance |
Gets current value of property distance. Distance in pixels between cluster objects. This distance is used as parameter during the clustering. The visualization objects are placed in center of gravity of the covered objects. Thus the actual distance between them may vary. Default value is |
sap.ui.vbm.ClusterDistance.getMetadata |
Returns a metadata object for class sap.ui.vbm.ClusterDistance. |
setDistance |
Sets a new value for property distance. Distance in pixels between cluster objects. This distance is used as parameter during the clustering. The visualization objects are placed in center of gravity of the covered objects. Thus the actual distance between them may vary. When called with a value of Default value is |
Creates a new subclass of class sap.ui.vbm.ClusterDistance with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.vbm.ClusterBase.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Gets current value of property distance.
Distance in pixels between cluster objects. This distance is used as parameter during the clustering. The visualization objects are placed in center of gravity of the covered objects. Thus the actual distance between them may vary.
Default value is "128"
.
Returns a metadata object for class sap.ui.vbm.ClusterDistance.
Sets a new value for property distance.
Distance in pixels between cluster objects. This distance is used as parameter during the clustering. The visualization objects are placed in center of gravity of the covered objects. Thus the actual distance between them may vary.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "128"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iDistance | int | "128" |
New value for property |