<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Arcade - Create a Label based on Map Symbology (Bivariate / Geometric Interval) in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-create-a-label-based-on-map-symbology/m-p/1149088#M44647</link>
    <description>&lt;P&gt;Thank you Johannes! That's very helpful. I'll try that out.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Mar 2022 14:45:44 GMT</pubDate>
    <dc:creator>JesSkillman</dc:creator>
    <dc:date>2022-03-01T14:45:44Z</dc:date>
    <item>
      <title>Arcade - Create a Label based on Map Symbology (Bivariate / Geometric Interval)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-create-a-label-based-on-map-symbology/m-p/1148063#M44606</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a feature service that is symbolized using bivariate colors for two continuous variables. The grid size is 3x3, so there are nine possible colors on the map (see screen shot). In the pop-up window, I want to provide textual context for the color using an Arcade When() function, but I'm not sure how to do that with this type of symbology. Is it possible to set up a conditional for the pop-up window based off of the colors of the map, rather than the values in a field? General concept below.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;When(
featurecolor == 'red', "High Conservation Need",
featurecolor == 'purple', "High Restoration Need", 
featurecolor == 'green', "High Protection Need",
featurecolor == nocolor, "No Protection or Restoration Goals"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 17:01:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-create-a-label-based-on-map-symbology/m-p/1148063#M44606</guid>
      <dc:creator>JesSkillman</dc:creator>
      <dc:date>2022-02-25T17:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Create a Label based on Map Symbology (Bivariate / Geometric Interval)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-create-a-label-based-on-map-symbology/m-p/1148470#M44615</link>
      <description>&lt;P&gt;AFAIK, there's no way to access the symbology information. You have to do it yourself:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function categorize(value, thresholds) {
    // takes a value and an array of numbers
    // returns the array index of the highest number that is less or equal to the value
    // categorize(6, [0, 5, 10])  --&amp;gt;  1
    if(value == null) { return 0 }  // treat empty goal as low
    thresholds = Sort(thresholds)
    for(var i = Count(thresholds)-1; i &amp;gt;= 0; i--) {  // iterate backwards through the array
        if(thresholds[i] &amp;lt;= value) {
            return i
        }
    }
}

if($feature.ProtectionGoal == null &amp;amp;&amp;amp; $feature.RestorationGoal == null) {
    return "No Protection or Restoration Goals"
}

var protection_thresholds = [0, xxx, yyy]  // ha
var protection_goal = categorize($feature.ProtectionGoal, protection_thresholds)

var restoration_thresholds = [0, xxx, yyy]  // ha
var restoration_goal = categorize($feature.RestorationGoal, restoration_thresholds)

var status = When(
    protection_goal == 0 &amp;amp;&amp;amp; restoration_goal == 0, "low protection and restoration need",
    protection_goal == 1 &amp;amp;&amp;amp; restoration_goal == 0, "medium protection need",
    protection_goal == 2 &amp;amp;&amp;amp; restoration_goal == 0, "high protection need",
    protection_goal == 0 &amp;amp;&amp;amp; restoration_goal == 1, "medium restoration need",
    protection_goal == 1 &amp;amp;&amp;amp; restoration_goal == 1, "bla",
    protection_goal == 2 &amp;amp;&amp;amp; restoration_goal == 1, "bla",
    protection_goal == 0 &amp;amp;&amp;amp; restoration_goal == 2, "bla",
    protection_goal == 1 &amp;amp;&amp;amp; restoration_goal == 2, "bla",
    protection_goal == 2 &amp;amp;&amp;amp; restoration_goal == 2, "bla",
    "uncategorized"
    )
return status&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 28 Feb 2022 08:50:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-create-a-label-based-on-map-symbology/m-p/1148470#M44615</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-02-28T08:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Create a Label based on Map Symbology (Bivariate / Geometric Interval)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-create-a-label-based-on-map-symbology/m-p/1148628#M44620</link>
      <description>&lt;P&gt;Thank you Johannes!&lt;/P&gt;&lt;P&gt;That's a bummer, but I sort of expected that outcome. Now I just have to figure out how to calculate the breaks when using a geometric interval. I was lookinig on the data classification methods site, and &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/data-classification-methods.htm" target="_self"&gt;did not see&lt;/A&gt; the algorithm for Geometric intervals, hence why it'd be a lot easier if we could base the conditionals off of the intervals that were already created and symbolized.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 16:22:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-create-a-label-based-on-map-symbology/m-p/1148628#M44620</guid>
      <dc:creator>JesSkillman</dc:creator>
      <dc:date>2022-02-28T16:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Create a Label based on Map Symbology (Bivariate / Geometric Interval)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-create-a-label-based-on-map-symbology/m-p/1148987#M44643</link>
      <description>&lt;P&gt;Just tested a little:&lt;/P&gt;&lt;P&gt;In ArcGIS Pro, you can see the class breaks in the field histograms of the symbology pane:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1646116730779.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/35220i176583FF096DF72D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_0-1646116730779.png" alt="JohannesLindner_0-1646116730779.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you publish that layer and view its symbology in MapViewer Classic, it reveals that bivariate symbology actually uses an Arcade expression to symbolize, you can get the values out of that:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1646116873406.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/35221iA570B4F3C2A1B0D1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_1-1646116873406.png" alt="JohannesLindner_1-1646116873406.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_2-1646116921603.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/35222iA66550AC3F6772BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_2-1646116921603.png" alt="JohannesLindner_2-1646116921603.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can either use these values in the expression above, or you can just copy/paste the symbology expression into a popup expression. In my case (X and Y values of the geometry's centroid), it looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_4-1646117207471.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/35224i2FE1B4B4870A7334/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_4-1646117207471.png" alt="JohannesLindner_4-1646117207471.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_5-1646117248556.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/35225i16146F2BA1FA7414/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_5-1646117248556.png" alt="JohannesLindner_5-1646117248556.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Of course, you should probably edit the expression a bit to show more descriptive text...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can't test with Map Viewer, but there's probably a way to get to the values there, too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 06:51:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-create-a-label-based-on-map-symbology/m-p/1148987#M44643</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-03-01T06:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Create a Label based on Map Symbology (Bivariate / Geometric Interval)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-create-a-label-based-on-map-symbology/m-p/1149088#M44647</link>
      <description>&lt;P&gt;Thank you Johannes! That's very helpful. I'll try that out.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 14:45:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-create-a-label-based-on-map-symbology/m-p/1149088#M44647</guid>
      <dc:creator>JesSkillman</dc:creator>
      <dc:date>2022-03-01T14:45:44Z</dc:date>
    </item>
  </channel>
</rss>

