Bivariate renderers


Purpose
This sample consists of two custom bivariate renderers: ColorBivariateRend and ColorSzBivariateRend. In general, bivariate renderers are useful for representing the relationship between two data distributions. Two variables are classified independently, and their combination is represented using a combination of symbol color and size.
The first renderer, ColorBivariateRend, combines two graduated color representations. On this renderer, symbol colors from the constituent representations are blended to produce the resultant symbology. The second renderer, ColorSzBivariateRend, combines a graduated color representation and a graduated symbol representation. On this renderer, the symbol color is taken from one representation, while symbol size is taken from the other representation to produce the resultant symbology. Each bivariate renderer is built from two ClassBreaksRenderers, and both implement the IBivariateRenderer interface. ColorBivariateRend also implements the IColorBivariateRend custom interface.
The sample code for each renderer demonstrates how to design a feature renderer to draw custom layer symbology. IFeatureRenderer.getSymbolByFeature is also demonstrated by both sets of code. ColorSzBivariateRend shows how to draw symbology in both the Geography and Annotation draw phases. This renderer also employs a strategy to draw symbols in order from large to small so that smaller features appear on top.

How to use

See How to use ArcGIS samples for help on running the sample.

  1. Run the sample application. The application loads a map of the world with three country layers.
  2. Click Set Original Renderers. The first two layers represent population and area.
  3. Click Set Bivariate Renderers. The third layer represents a combination of the first two.
  4. Turn off the first and second layers to see the countries with the combined attributes.

Additional information

The TOC entry for ColorSzBivariateRend is not editable (the same behavior as BiUniqueValueRenderer).


If you installed the samples feature, you will find the files associated with this sample in <Your Developer Kit install location>\DeveloperKit10.4\Java\Samples\ArcObjects.

cartography/BivariateRenderers.javaMain class
cartography/ColorBivariateRend.javaSupporting class




Development licensingDeployment licensing
Engine Developer KitEngine
ArcGIS for Desktop Basic