<?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: Issue in Updating Unique Value Renderer of Hosted Feature Layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-in-updating-unique-value-renderer-of-hosted/m-p/1383494#M83668</link>
    <description>&lt;P&gt;Guessing the issue where you are creating the UniqueValueRenderer. Please take a look at this doc and make sure you are setting everything right:&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/visualization/data-driven-styles/unique-types/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/visualization/data-driven-styles/unique-types/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Feb 2024 17:00:57 GMT</pubDate>
    <dc:creator>UndralBatsukh</dc:creator>
    <dc:date>2024-02-16T17:00:57Z</dc:date>
    <item>
      <title>Issue in Updating Unique Value Renderer of Hosted Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-in-updating-unique-value-renderer-of-hosted/m-p/1382049#M83636</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;I am trying to modify the unique value renderer of a hosted feature layer. I do not get any error on executing save() operation of the layer but the unique value renderer of the layer changes in simple renderer (default renderer of feature layer).&lt;BR /&gt;&lt;BR /&gt;I have attached my JS code below. Kindly let me know what I must be doing wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import FeatureLayer from "@arcgis/core/layers/FeatureLayer.js";
import UniqueValueRenderer from "@arcgis/core/renderers/UniqueValueRenderer.js";

const layer = new FeatureLayer({
    portalItem: {
       id: ""//Hosted Feature Layer id.
    }
});

const tempRenderer = layer.renderer.clone().toJSON();
const UniqueValueInfoTemp = {
   label: "",//label of name
   symbol: newSymbol, //Picture Maker symbol
   value: "" //same as label
};
const uniqueValueGroup = tempRenderer.uniqueValueGroups[0].classes;
const newClass = {
   label: "",//label of name
   symbol: newSymbol, //Picture Maker symbol
   value: "" //same as label
};
uniqueValueGroup.push(newClass);
uniqueValueInfos.push(UniqueValueInfoTemp);
const renderer = UniqueValueRenderer.fromJSON(tempRenderer);
layer.renderer = tempRenderer;
layer.refresh();
await layer.save();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Mani&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 07:39:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-in-updating-unique-value-renderer-of-hosted/m-p/1382049#M83636</guid>
      <dc:creator>jauhari_mani</dc:creator>
      <dc:date>2024-02-14T07:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in Updating Unique Value Renderer of Hosted Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-in-updating-unique-value-renderer-of-hosted/m-p/1383494#M83668</link>
      <description>&lt;P&gt;Guessing the issue where you are creating the UniqueValueRenderer. Please take a look at this doc and make sure you are setting everything right:&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/visualization/data-driven-styles/unique-types/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/visualization/data-driven-styles/unique-types/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 17:00:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-in-updating-unique-value-renderer-of-hosted/m-p/1383494#M83668</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2024-02-16T17:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in Updating Unique Value Renderer of Hosted Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-in-updating-unique-value-renderer-of-hosted/m-p/1385897#M83724</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/53756"&gt;@UndralBatsukh&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I have checked my JSON Object against the one mentioned in the link you provided they turn out to be same.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 07:14:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-in-updating-unique-value-renderer-of-hosted/m-p/1385897#M83724</guid>
      <dc:creator>jauhari_mani</dc:creator>
      <dc:date>2024-02-23T07:14:52Z</dc:date>
    </item>
  </channel>
</rss>

