A RetroSearch Logo

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

Search Query:

Showing content from https://developers.arcgis.com/javascript/latest/sample-code/visualization-arcade/ below:

Create a custom visualization using Arcade | Sample Code | ArcGIS Maps SDK for JavaScript 4.33

This sample demonstrates how to create a data-driven visualization of unique values with an Arcade expression. Arcade is useful for creating visualizations in a FeatureLayer based on a value generated from an expression instead of a field value.

In this sample, a layer whose features represent counties in the U.S. is added to the map. Each feature contains a total count for registered republicans, democrats, and independents in the county. If you wanted to shade each county with a different color depending on the dominant party in the county, you could do so by referencing an additional field indicating the dominant party. In this case, there isn't a field for dominant political party. Arcade allows you to write a simple expression that evaluates to the predominant party. This expression is passed to the valueExpression property of the UniqueValueRenderer.

You can also optionally pass an arcade expression to a visual variable. In this sample we also pass an expression to an opacity visual variable to indicate which counties are more lopsided in their support for a particular party.

The Arcade expressions used in this sample are described in more detail in the Visualization profile of the Arcade expressions guide.


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