Select to view content in your preferred language

Set Label color to category value?

906
11
06-23-2024 08:24 PM
DavidGray1
Regular Contributor

Hello Community;   It took awhile to find where this page is where one can post a question to the user community.

I am wanting to set the color of a label to the value that that variable contains in a graduated symbol color scheme for the data. Is this possible without fancy cryptic programming?    Thanks;    Dave

Tags (1)
11 Replies
DavidGray1
Regular Contributor

Is this the right place to ask questions on using Pro

ChristopherCounsell
MVP Regular Contributor

No. I've moved it to the ArcGIS Pro community.

0 Kudos
ChristopherCounsell
MVP Regular Contributor

Don't view programming as 'cryptic'. It's more accessible than you think.

But yes, you can use Label Classes. 

https://pro.arcgis.com/en/pro-app/latest/help/mapping/text/label-classes.htm

Add a label class then use the filtering on it for each value. This is typically used for different scale levels but if you have a few values for different colours it might not be too bad. As you get more values, the more classes you'll need, so using Arcade might be easier.

0 Kudos
DavidGray1
Regular Contributor

Thanks Christopher; Now that a number of my inquiries have been moved over to this community, I am making progress again. This topic is next! Thanks for the link to a possible solution. Will study and get back with the results. Dave  

0 Kudos
DavidGray1
Regular Contributor

Again thanks Christopher; This link to using label classes appears to be heading down the right path. But it can never be easy. I got to the point of creating a specific label class using the symbology definition that has the label values graduated by a color scheme. The option for color was selected. Moving to the next steps that say to ensure that List By Labeling is the active method I find that in the Contents Pane there are only the choices of List By Drawing Order, List By Element Type, List By Map Frame, and List Map Series Pages. So I am not sure what the purpose of that is. But having specified color from the symbology rather than the scale, the label colors have not adopted the symbology coloring scheme. And I just do not see a Color Scheme options button that looks like the gear sprocket button.  Currently stumped.  Am using Pro 3.2.2.      Dave

0 Kudos
ChristopherCounsell
MVP Regular Contributor

Label classes would need to be added for each colour and filtered. e.g. if field has values of 1, 2, 3; you configure 3 label colours of red, green and blue, filtered for 1, 2 and 3 respectively.

It's tedious. Not aware of any options to easily colour labels the same way you would symbolize the layers.

0 Kudos
DavidGray1
Regular Contributor

Hmmm, sounds like a feature request could be in the making.  But, also curious where is the Color Scheme options button that looks like a gear sprocket? In the Label or Symbology working pane on the right hand side? And the List by Labeling option in the Contents pane, where is that option?    Thanks for the help, though. Hopefully someone can contribute any other perspectives on this inquiry.  Dave

0 Kudos
JesseWickizer
Esri Contributor

Here's how to set the color of your labels to match the colors used in your graduated symbol color scheme without programming.

  1. Configure graduated symbols in the layer symbology.
    • JesseWickizer_0-1724194829264.png
  2. Change the Contents pane to List by labeling.
    • JesseWickizer_1-1724194903304.png
  3. Right-click the layer that has the graduated symbols and choose Create Label Classes From Symbology
  4. In the Create Label Classes From Symbology dialog box, check the Color setting to make the color of the new label classes match the color from the graduated symbol classes.  
    • JesseWickizer_2-1724195156518.png
  5. New label classes will be created with SQL queries that match the symbology ranges and text colors that match the corresponding graduated symbol color.

JesseWickizer_3-1724195362233.png

 

0 Kudos
DavidGray1
Regular Contributor

Thanks Jesse; For the reply. And apologize for taking so long to get back with some further comments.

This got me a little further down the line. I now see that the List By Labeling tag is only available in the Table of Contents for a Map itself. I was trying to find it in a Map Frame being used in a layout for exporting a product map. But that would  only be logical since that is where symbologies are illustrated in a Legend.

So I went back and tried it on the source Map. Yeah, the little tag hieroglyphic is there for the List By Labeling view. So after a right click and selecting Create Label Classes From Symbology and specifying Color and not Scale Range, click OK, and it creates a series of boxes corresponding to value range categories created in the Symbology Graduated Colors method and with the 5 classes. See pic. 

  Capture_Au-ppm_Label_Classes.JPG

I don't see the point 1,2,3 etc to the right of the Labeling TOC as is shown in your example.  And it still doesn't get the labels colored. What am I missing?    Thanks;   Dave

0 Kudos