Graphics representing features can be vertically extruded to represent properties of the data that might otherwise go unseen. Extrusion can add visual prominence to data beyond what may be offered by varying the color, size, or shape of symbol alone. For example, graphics representing wind turbines in a wind farm application can be extruded by a real-world "height" attribute so that they can be visualized in a landscape. Likewise, census data can be extruded by a thematic "population" attribute to visually convey population levels across a country.
How to use the sample
Run the sample. Note that the graphics are extruded to the level set in their height property.
How it works
Create a GraphicsOverlay and SimpleRenderer.
Set the RendererSceneProperties.extrusionMode for the renderer to Enums.ExtrusionModeBaseHeight.
Specify the attribute name of the graphic that the extrusion mode will use: RendererSceneProperties.extrusionExpression: "[height]".
Set the renderer on the graphics overlay.
Create graphics with the attribute set: graphic.attributes.insertAttribute("height", z).
Relevant API
RendererSceneProperties
ExtrusionMode
RendererSceneProperties.extrusionExpression
SimpleRenderer
About the data
Data is hard coded in this sample as a demonstration of how to create and set an attribute to a graphic. To extrude graphics based on pre-existing attributes (e.g. from a feature layer) see the FeatureLayerExtrusion sample.