<?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 How to update legend when the data for the layer changes in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-legend-when-the-data-for-the-layer/m-p/1150110#M7196</link>
    <description>&lt;P&gt;i am working with imagery layers and i am overwriting this layer and publishing it to the portal using a script. Each time i republish it, the layer has a new data so the old legend that was created for the service is no longer valid. I want to be able to update the legend whenever the service is republished for my map so that i can later use it in apps like Webappbuilder.&amp;nbsp; I have this workflow in mind.&lt;/P&gt;&lt;P&gt;go through the data which is being used for publishing and search for the values minimum and maximum.&lt;/P&gt;&lt;P&gt;create the layer file and change the symbology using classes based on the maxmim and minimum.&lt;/P&gt;&lt;P&gt;create a legend and publish the data and save to existing map using the script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately i am unable to figure out how to do as i am new to the esri API's. my service has a StretchColorizer. i tried changing it and i cannot. Is there a way i can automate this whole procedure of changing the legend based on the new data values in my data?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Mar 2022 10:00:01 GMT</pubDate>
    <dc:creator>RehanChaudhary</dc:creator>
    <dc:date>2022-03-03T10:00:01Z</dc:date>
    <item>
      <title>How to update legend when the data for the layer changes</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-legend-when-the-data-for-the-layer/m-p/1150110#M7196</link>
      <description>&lt;P&gt;i am working with imagery layers and i am overwriting this layer and publishing it to the portal using a script. Each time i republish it, the layer has a new data so the old legend that was created for the service is no longer valid. I want to be able to update the legend whenever the service is republished for my map so that i can later use it in apps like Webappbuilder.&amp;nbsp; I have this workflow in mind.&lt;/P&gt;&lt;P&gt;go through the data which is being used for publishing and search for the values minimum and maximum.&lt;/P&gt;&lt;P&gt;create the layer file and change the symbology using classes based on the maxmim and minimum.&lt;/P&gt;&lt;P&gt;create a legend and publish the data and save to existing map using the script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately i am unable to figure out how to do as i am new to the esri API's. my service has a StretchColorizer. i tried changing it and i cannot. Is there a way i can automate this whole procedure of changing the legend based on the new data values in my data?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 10:00:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-legend-when-the-data-for-the-layer/m-p/1150110#M7196</guid>
      <dc:creator>RehanChaudhary</dc:creator>
      <dc:date>2022-03-03T10:00:01Z</dc:date>
    </item>
  </channel>
</rss>

