A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.arcgis.com/en/javascript/jsapi/dotdensityrenderer-amd.html below:

DotDensityRenderer | API Reference | ArcGIS API for JavaScript 3.46

require(["esri/renderers/DotDensityRenderer"], function(DotDensityRenderer) { /* code goes here */ });
Description

(Added at v3.7)

The

DotDensityRenderer

provides the ability to create dot density visualizations on data. A dot density map can be used to visualize the variation in spatial density of a discrete spatial phenomenon. You can visualize only one variable (for example, 1 dot = 25,000 acres harvested) or multiple variables (for example, 1 green dot = 10,000 acres of corn harvested; 1 brown dot = 10,000 acres of wheat harvested) on one map.

Things to consider when making dot density maps:

More information on working with rendering, smart mapping, and using visual variables can be found in the Data Visualization guide topic and the multiple samples referenced within this topic.

Note: the dot density renderer uses canvas, which is not supported in versions 7 and 8 of Internet Explorer.

Samples

Search for

samples

that use this class.

Class hierarchy
esri/renderers/Renderer
|_esri/renderers/DotDensityRenderer
Constructors Properties Methods

Constructor Details

Creates a new instance of dot density renderer.

Parameters: <Object> params Required An object with various options. Refer to the options table for details. params properties: <Color> backgroundColor Optional The color to be used for the background of the symbol. By default no background color will be applied. <String> dotShape Optional The shape to be used for the dot. Can be a "square" or a "circle". The default is a "square". <Number> dotSize Optional The size of the dot in pixels. <Number> dotValue Required The value that a dot represents.

Typically one dot is more than one. For example if the value of the field being mapped is 150,000 and the dotValue is 1,000 the feature will have 150 dots randomly placed within the boundary of the feature. Values are rounded up. A value of 499 would not get a dot. A value of 500 would get one dot.

<Object[]> fields Required An array of objects, where each object defines a field to be mapped and its color.
[
  {
    name: <String>,  
    color : <Color>
  },
  ...
]
<LineSymbol> outline Optional The line symbol to use on the outline of the feature. By default no outline will be applied. Sample:
require(["esri/renderers/DotDensityRenderer", ... ], function(DotDensityRenderer, ... ){
  var dotDensityRenderer = new DotDensityRenderer({
    fields: [{
      name: "M163_07",
      color: new Color([52, 114, 53])
    }],
    dotValue: 4000,
    dotSize: 2
  });

  layer.setRenderer(dotDensityRenderer);
});

Property Details

The color to be used for the background of the symbol. By default no background color will be applied.

The shape to be used for the dot.

Known values: "square" | "circle"

Default value: "square"

The size of the dot in pixels.

The value that a dot represents.

An array of objects, where each object defines a field to be mapped and its color.

Required.
[
  {
    name: <String>,  
    color : <Color>
  },
  ...
]

The line symbol to use on the outline of the feature. By default no outline will be applied.

Method Details

Gets the color for the Graphic. (Added at v3.8)

Returns the opacity value for the specified graphic. This is calculated using the

opacityInfo

definition.

(Added at v3.11) Parameters: <Graphic> graphic Required Returns the opacity value appropriate for the given graphic. This value is calculated based on the opacityInfo definition. <Object> options Optional This optional parameter supports opacityInfo. If none is provided, the Renderer.opacityInfo will be used.

Returns the angle of rotation (in degrees) for the graphic calculated using rotationInfo. (Added at v3.7)

Return the symbol size (in pixels) for the graphic, calculated using sizeInfo. (Added at v3.7)

Parameters: <Graphic> graphic Required The graphic for which you want to calculate the symbol size. <Object> options Optional This optional parameter supports sizeInfo. If none is provided, the Renderer.sizeInfo will be used.

Gets the symbol for the Graphic.

Parameters: <Graphic> graphic Required Graphic to symbolize. Used when creating a custom renderer.

Updates the background color of the shape. For the changes to take effect, you need to call

GraphicsLayer.redraw

after calling this method.

Parameters: <Color> color Required Background color.

Updates the size of the dot. Size represents screen pixels. For the changes to take effect, you need to call

GraphicsLayer.redraw

after calling this method.

Parameters: <Number> size Required The size of the dot in pixels.

Updates the value that a dot represents. For the changes to take effect, you need to call

GraphicsLayer.redraw

after calling this method.

Parameters: <Number> value Required The value that a dot represents.

Updates the outline symbol of the shape. For the changes to take effect, you need to call

GraphicsLayer.redraw

after calling this method.

Parameters: <LineSymbol> outline Required The line symbol to use on the outline of the feature.

Converts object to its ArcGIS Server JSON representation. (Added at v2.1)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4