Select to view content in your preferred language

Dashboards That Pop: Dynamic Element Titles

931
2
05-14-2024 09:46 AM
JenniferAcunto
Esri Regular Contributor
10 2 931

If you have ever wanted to add dynamic titles to your Dashboard elements, then this is the blog for you. With some out of the box thinking and some planning we can easily create some fancy dynamic titles, in a variety of styles too. 

 

Filtered elements now have a title displaying the filtered state.Filtered elements now have a title displaying the filtered state.

 

This is not a capability of the built-in title section of our elements, so we’re going to make our own faux title sections using a List element. 

List Set Up 

Set the Maximum Features Displayed to 1.  

Next build out your desired title. You can use the Arcade Advanced Formatting section or just build it out in the Line Item Template. Which method you want to use depends on you and your data.  

Line Item TemplateLine Item Template

 

Style Your List 

Use the List the same background and text colors as the element you are adding a title to to create a title that blends into your element (Map element). Or you can use a contrasting background color to create a title that stands out (Pie Chart element). 

List Color SettingsList Color Settings

 

You can also use HTML to really jazz up your title. 

 

HTML in the Line Item TemplateHTML in the Line Item Template

 

Default Title Set Up 

I have designed my titles so they will display the appropriate state name as part of the title, but this only makes sense when users are actively filtering by a single state. When the state filter is not applied, my title displays the state name for the first record in my data. 

Dashboard elements showing US data displays a title of New HampshireDashboard elements showing US data displays a title of New Hampshire

 

This is ultimately why you can’t add a dynamic field from your data into the title sections of your elements. You are trying to apply a specific field from a specific record to an element composed of multiple records with various field values. How would Dashboards know which value to display? 

I don’t really care which record is being used, as they will all have the same state value when my state filter is applied. When the state filter is not applied, and there are various state values to choose from, I am not going to display any state values. Therefore, I need a default title that can be displayed when the state filter is not applied. To set up my default title, I will be using the No Selection message. I want it to look just like my dynamic title, so I will use the Source button in the Line Item Template to copy the HTML. I will do this even if I didn’t add any HTML directly to my list.  

Next i will use the Source button on the No Selection box and paste in the HTML. Then, I will replace the dynamic title message with my default one. 

List Line Item Template & No Selection LabelList Line Item Template & No Selection Label

 

Finally, I will make sure that the No Selection vertical alignment is set to Top and my default title is done. 

List Placement 

My list is all set up, but now I need to group it with my other element to make it look like one single element. To do this I will move my List and hold down the Shift key as I drop it into position. 

Group ElementsGroup Elements

 

Then I will adjust the sizing to make sure that my title has enough room to display my longest title. 

Actions Set Up 

Now I just need a Category Selector to power my dynamic titles. I need to mark all of my title list elements to render only when filtered to ensure that my default title displays. 

Actions: Render only when filteredActions: Render only when filtered

 

Considerations 

Before setting up dynamic titles, you should really evaluate your dashboard and determine if it is appropriate. This only works when simple interactions are set up. If you have a lot of different filters and interactions set up, know that only one of them can control your titles. Does it make sense that your titles will change ONLY when that particular filter is used? Do dynamic titles add to your users’ understanding or does it add unnecessary complexity?  

 

Happy Dashboarding! 

Dashboards That Pop 

2 Comments
anonymous55
Frequent Contributor

I am wishing this dashboard series never finished. Best tip and trick Thankyou @JenniferAcunto 

JenniferAcunto
Esri Regular Contributor

@anonymous55 

It's still going, it's just sporadic. This blog is more of a 'when I'm between customer projects' activity as opposed to a scheduled/dedicated time activity. I am glad you find it useful.

About the Author
I'm a Technical Consultant that focuses on app configuration with a little Geospatial Strategy and Governance thrown in.