relationship
require(["esri/renderers/smartMapping/symbology/relationship"], function(relationshipSchemes) { /* code goes here */ });
esri/renderers/smartMapping/symbology/relationship
Object containing helper methods for getting optimal symbol schemes used to create relationship (bivariate choropleth) visualizations. The getSchemes() returns color schemes best suited to the given basemap for this visualization style.
Method Overview
Name | Return Type | Summary | Object | |
---|---|---|---|---|
RelationshipScheme | Clones a relationship (bivariate color) scheme object. more details | more details | relationship | |
RelationshipSchemes | Returns a primary scheme and secondary schemes defining symbol properties for relationship-based (bivariate choropleth) data-driven visualizations in a Layer. more details | more details | relationship |
Method Details
- cloneScheme(scheme){RelationshipScheme}
Clones a relationship (bivariate color) scheme object.
Parameter:scheme RelationshipSchemeThe relationship scheme object to clone.
Returns:Type Description RelationshipScheme Returns a clone of the given relationship scheme object. Example:// clones the primary scheme returned from the getSchemes() method const relationshipScheme = primaryScheme.clone();
- getSchemes(params){RelationshipSchemes}
Returns a primary scheme and secondary schemes defining symbol properties for relationship-based (bivariate choropleth) data-driven visualizations in a Layer. The
basemap
parameter determines the color of the symbols used to visualize each feature. ThegeometryType
determines which type of symbol to return.Parameters:params ObjectSee the table below for details of each parameter that may be passed to this function.
Specification:The basemap to pair with the visualization. This value indicates the best symbol colors for visualizing features with the given basemap.
geometryType StringThe geometry type of the features to visualize.
Possible Values: point | multipoint | polyline | polygon | mesh
theme StringoptionalDefault Value: defaultDetermines which set of primary and secondary color schemes to return
Possible Values: default
worldScale BooleanoptionalIndicates if the size units of the scheme will be in meters. This should be
true
when the scheme is intended for 3D volumetric symbology. Aview
must be provided if this property is set totrue
.view SceneViewoptionalThe SceneView instance in which the scheme will be used. This property is only applicable when the scheme will be used in conjunction with 3D symbols.
Returns:Type Description RelationshipSchemes Returns an object containing the optimal relationship color scheme to use for the given basemap; it also contains secondary schemes. Example:// gets the primary scheme for the features of the given geometry type and basemap const schemes = relationshipSchemes.getSchemes({ basemap: map.basemap, geometryType: featureLayer.geometryType }); // the best default scheme for the layer and basemap const primaryScheme = schemes.primaryScheme;
Type Definitions
Defines the symbology scheme used to visualize relationship renderers (bivariate color) based on the layer's geometry type.
- RelationshipSchemeForMesh
Properties defining the symbology scheme used to visualize relationship renderers (bivariate color) for mesh features.
- Properties:
- id String
The ID uniquely identifying the color scheme.
colorsForClassBreaks Object[]Defines the colors to use in each bin of the relationship visualization.
noDataColor ColorThe color of the fill symbol used to indicate features with no data.
opacity NumberThe opacity of the fill symbol (0 - 1).
- RelationshipSchemeForPoint
Properties defining the symbology scheme used to visualize relationship renderers (bivariate color) for point features.
- Properties:
- id String
The ID uniquely identifying the color scheme.
colorsForClassBreaks Object[]Defines the colors to use in each bin of the relationship visualization.
noDataColor ColorThe color of the point symbol used to indicate features with no data.
outline ObjectProperties for defining the outline of the marker symbol.
opacity NumberThe opacity of the point symbol (0 - 1).
size NumberThe size of the point symbol in points.
- RelationshipSchemeForPolygon
Properties defining the symbology scheme used to visualize relationship renderers (bivariate color) for polygon features.
- Properties:
- id String
The ID uniquely identifying the color scheme.
colorsForClassBreaks Object[]Defines the colors to use in each bin of the relationship visualization.
noDataColor ColorThe color of the fill symbol used to indicate features with no data.
outline ObjectProperties for defining the outline of the fill symbol.
opacity NumberThe opacity of the fill symbol (0 - 1).
- RelationshipSchemeForPolyline
Properties defining the symbology scheme used to visualize relationship renderers (bivariate color) for polyline features.
- Properties:
- id String
The ID uniquely identifying the color scheme.
colorsForClassBreaks Object[]Defines the colors to use in each bin of the relationship visualization.
noDataColor ColorThe color of the line symbol used to indicate features with no data.
opacity NumberThe opacity of the line symbol (0 - 1).
width NumberThe width of the line symbol in points.
- RelationshipSchemes
The return object of the getSchemes() method.
- Properties:
- primaryScheme RelationshipScheme
The relationship scheme best suited for the given basemap and geometry type.
secondarySchemes RelationshipScheme[]Additional relationship schemes that may be used to visualize data of the given geometry type overlaid on the given basemap.
basemapId StringThe ID of the basemap associated with the given schemes.