<?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: Initialize UniqueValue renderer with 3 fields in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/initialize-uniquevalue-renderer-with-3-fields/m-p/42093#M3636</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, that's what I thought: if you concatenate the three values Party/State/County, then every county should get a unique color. So, I supposed that you wanted to visualize either the party or the state or the county...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E-J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Aug 2019 16:03:45 GMT</pubDate>
    <dc:creator>Egge-Jan_Pollé</dc:creator>
    <dc:date>2019-08-23T16:03:45Z</dc:date>
    <item>
      <title>Initialize UniqueValue renderer with 3 fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/initialize-uniquevalue-renderer-with-3-fields/m-p/42089#M3632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using ArcGIS &lt;SPAN&gt;JavaScript API 4.12 version.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to initialize UniqueValue renderer with 3 fields. But&amp;nbsp;.createRenderer supporting only one field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;// visualization based on categorical field &lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; typeParams &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; 
  layer&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
  basemap&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;basemap&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
  field&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Party"&lt;/SPAN&gt; 
&lt;SPAN class="comment token"&gt;// field2: "State",  // it is not supporting&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// field3: "County"  // it is not supporting&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 
&lt;SPAN class="comment token"&gt;// when the promise resolves, apply the visual variables to the renderer &lt;/SPAN&gt;

typeRendererCreator&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;createRenderer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;typeParams&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 
  &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;then&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;response&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; 
    layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;renderer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; response&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;renderer&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advise please.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:37:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/initialize-uniquevalue-renderer-with-3-fields/m-p/42089#M3632</guid>
      <dc:creator>SirishByreddy</dc:creator>
      <dc:date>2021-12-10T21:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Initialize UniqueValue renderer with 3 fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/initialize-uniquevalue-renderer-with-3-fields/m-p/42090#M3633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/37722"&gt;Sirish Byreddy&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Isn't it just the case that you want to have 3 different renderers? One for party, one for state, one for county?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case you will have to repeat your code three times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know what you think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Egge-Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Aug 2019 11:13:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/initialize-uniquevalue-renderer-with-3-fields/m-p/42090#M3633</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2019-08-23T11:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Initialize UniqueValue renderer with 3 fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/initialize-uniquevalue-renderer-with-3-fields/m-p/42091#M3634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Egge-Jan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create&amp;nbsp;one Unique renderer with 3 fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;S B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Aug 2019 11:18:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/initialize-uniquevalue-renderer-with-3-fields/m-p/42091#M3634</guid>
      <dc:creator>SirishByreddy</dc:creator>
      <dc:date>2019-08-23T11:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Initialize UniqueValue renderer with 3 fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/initialize-uniquevalue-renderer-with-3-fields/m-p/42092#M3635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sirish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example given above can be accomplished using an Arcade Expression, but I'm not sure it gives a useful result because our color schemes contain a maximum of 10 colors for unique values before the colors start repeating, and if you accept the default max number of types of 10, then you will potentially get a lot of values that don't belong to a category.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Arcade expression is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fields &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DOM_CROP_ACRES&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;STATE&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;COUNTY&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;Concatenate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fields&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;", "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an app that demonstrates this:&amp;nbsp;&lt;A href="https://codepen.io/kekenes/pen/qBWRMGR?&amp;amp;editable=true&amp;amp;editors=100" rel="nofollow noopener noreferrer" target="_blank"&gt;https://codepen.io/kekenes/pen/qBWRMGR?&amp;amp;editable=true&amp;amp;editors=100&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/457853_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:37:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/initialize-uniquevalue-renderer-with-3-fields/m-p/42092#M3635</guid>
      <dc:creator>KristianEkenes</dc:creator>
      <dc:date>2021-12-10T21:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Initialize UniqueValue renderer with 3 fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/initialize-uniquevalue-renderer-with-3-fields/m-p/42093#M3636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, that's what I thought: if you concatenate the three values Party/State/County, then every county should get a unique color. So, I supposed that you wanted to visualize either the party or the state or the county...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E-J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Aug 2019 16:03:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/initialize-uniquevalue-renderer-with-3-fields/m-p/42093#M3636</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2019-08-23T16:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Initialize UniqueValue renderer with 3 fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/initialize-uniquevalue-renderer-with-3-fields/m-p/42094#M3637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Hi Kristian Ekenes,&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thank you very much for the help and i am getting Uniuevalues for multiple fields.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Correct it is giving only 10 colors and im trying to&amp;nbsp;assign&amp;nbsp;each unique value feature with unique color (between user choosen "from color" and "to color" ex: &lt;SPAN style="color: #c41a16; background-color: #f8f8f8;"&gt;AlgorithmicColorRamp&lt;/SPAN&gt;)&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Appreciate any&amp;nbsp;hints on the colorramp.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thanks&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;S B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Aug 2019 06:57:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/initialize-uniquevalue-renderer-with-3-fields/m-p/42094#M3637</guid>
      <dc:creator>SirishByreddy</dc:creator>
      <dc:date>2019-08-24T06:57:05Z</dc:date>
    </item>
  </channel>
</rss>

