Hi everyone,
I have a map with lines connecting origins and destinations. The origin points are styled in red, and the destination points are styled in green. Ideally, I’d like users to be able to choose between different attributes, and the connection lines would automatically update their style to reflect the selected attribute.
Here’s the setup: I’ve got a table with data about where products are built (origin) and where they’re shipped (destination), along with additional attributes. I used the "XY to Line" tool in ArcGIS Pro to create the lines connecting origins to destinations. My feature class contains these lines, with the endpoints styled as described (red for origins, green for destinations). The attribute table for the lines includes fields like "amount shipped," "cost to ship," and "time taken to ship."
What I’d like to do: Enable users to filter by an attribute (e.g., "amount shipped") and have the line colors dynamically adjust—for instance, transitioning from light gray to black based on the value of "amount shipped." Then, if the user selects a different attribute (e.g., "cost to ship"), the lines would restyle using the same gradient (light gray to black), but based on the values of the newly selected attribute.
From what I know, this functionality isn’t currently available. The only workaround I can think of is to create separate layers for each attribute, pre-style them, and let users toggle between these layers manually. Or am I wrong and dynamic changing styles by attributes can occur?
Side Question:
If the above is too complex or not feasible, I have a slightly different question. Let’s say I’m working with points instead of lines. For example, imagine I have a dataset of fire hydrants with attributes like "flow rate" and "pressure." Could users select an attribute, and the points dynamically adjust in size, color, or both based on the chosen attribute? Or would this also require creating separate, pre-styled layers for each attribute?
Just wondering how much flexibility is available here. Thanks in advance for your help!
Because you have access to Pro you can use Attribute-driven Symbology to set the color from a field value. This doc page explains how to format the color data, you can either use the standard CSS colors or created a coded-value domain with RGB values as the code name and user facing names as the description. Make sure you set the property connection to use Arcade instead of VBScript or you'll get a publishing error. If this isn't powerful enough you have to dive into the world of dictionary renderers, hopefully that isn't required for your simple layer.
I did a quick test and this doesn't work in Enterprise 11.1 or earlier but it does work in Online. It also requires the new map viewer and associated apps, if you need this to work in Web Appbuilder I think you're out of luck.
Thanks for introducing me to Attribute-Driven Symbology—it seems like the right approach!
I want to clarify a couple of things:
First, in ArcGIS Pro, is it possible to use an Arcade expression to control the symbology of my connection lines instead of hardcoding it to a specific field? I’m guessing this would allow the symbology to adjust dynamically based on attribute selection. Is this possible? If so, could you give me the big-picture steps for how one would set this up?
If the above is possible, here’s what I’m aiming for:
In an ArcGIS Dashboard, is there a way to set up a selector that allows users to pick an attribute—like "time taken to ship" or "cost to ship"—and have the connection line layer dynamically update its symbology based on their choice? I’m guessing this would involve some Arcade code written into the selector or another component. Is this possible? If so, could you explain the big-picture process for how this could be implemented?
The goal is to avoid creating multiple copies of the same layer in ArcGIS Pro (each pre-styled for a specific field) and toggling them on and off in the dashboard. Instead, I’d prefer to use a single connection line layer with symbology that updates dynamically based on the user’s selection—essentially binding the symbology to a variable rather than hardcoding it in advance.
Does this workflow sound doable? 😊
Using a full Arcade expression instead of just a field is easy, here's an example:
As for what you're proposing, I haven't played around with the advanced Dashboard data source options so I couldn't tell you if injecting a control value into the color field(s) is doable, you'll have to experiment with that once you get your layer up and running.