<?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 Creating Renderer with Multipart Color Ramp in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-renderer-with-multipart-color-ramp/m-p/1264442#M8461</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to update a Hosted Feature Layer View with a renderer containing a multipart color ramp. I used a color ramp example from the docs &lt;A href="https://developers.arcgis.com/documentation/common-data-types/color-ramp-objects.htm" target="_self"&gt;docs&lt;/A&gt; but could not make it work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;renderer_definition_multipart = {  
          "type": "classBreaksDef",
          "classificationField": field,
          "classificationMethod": "esriClassifyQuantile",
          "breakCount": 5,
          "colorRamp": {
              "type": "multipart",
              "colorRamps": [
                {
                  "type": "algorithmic",
                  "algorithm": "esriHSVAlgorithm",
                  "fromColor": [255,0,0,255],
                  "toColor": [255,255,0,255],
                  "start": 0,
                  "stop": 33.3
                  
                },
                {
                  "type": "algorithmic",
                  "algorithm": "esriHSVAlgorithm",
                  "fromColor": [0,255,255,255],
                  "toColor": [0,0,255,255],
                  "start": 33.3,
                  "stop": 100
                }
              ]
            }
        }
# Update renderer
renderer = view.layers[0].generate_renderer(renderer_definition_multipart) 
update_drawing_info = {"drawingInfo": {"renderer": renderer}}
view.layers[0].manager.update_definition(update_drawing_info)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error message I got is shown below. Not sure what is the problem, as I am not missing "algorithm"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LukasWrsch_0-1678106817000.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64398i46C90B27D24EDF2F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LukasWrsch_0-1678106817000.png" alt="LukasWrsch_0-1678106817000.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any Idea what I am doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Mar 2023 12:51:50 GMT</pubDate>
    <dc:creator>LukasWürsch</dc:creator>
    <dc:date>2023-03-06T12:51:50Z</dc:date>
    <item>
      <title>Creating Renderer with Multipart Color Ramp</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-renderer-with-multipart-color-ramp/m-p/1264442#M8461</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to update a Hosted Feature Layer View with a renderer containing a multipart color ramp. I used a color ramp example from the docs &lt;A href="https://developers.arcgis.com/documentation/common-data-types/color-ramp-objects.htm" target="_self"&gt;docs&lt;/A&gt; but could not make it work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;renderer_definition_multipart = {  
          "type": "classBreaksDef",
          "classificationField": field,
          "classificationMethod": "esriClassifyQuantile",
          "breakCount": 5,
          "colorRamp": {
              "type": "multipart",
              "colorRamps": [
                {
                  "type": "algorithmic",
                  "algorithm": "esriHSVAlgorithm",
                  "fromColor": [255,0,0,255],
                  "toColor": [255,255,0,255],
                  "start": 0,
                  "stop": 33.3
                  
                },
                {
                  "type": "algorithmic",
                  "algorithm": "esriHSVAlgorithm",
                  "fromColor": [0,255,255,255],
                  "toColor": [0,0,255,255],
                  "start": 33.3,
                  "stop": 100
                }
              ]
            }
        }
# Update renderer
renderer = view.layers[0].generate_renderer(renderer_definition_multipart) 
update_drawing_info = {"drawingInfo": {"renderer": renderer}}
view.layers[0].manager.update_definition(update_drawing_info)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error message I got is shown below. Not sure what is the problem, as I am not missing "algorithm"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LukasWrsch_0-1678106817000.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64398i46C90B27D24EDF2F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LukasWrsch_0-1678106817000.png" alt="LukasWrsch_0-1678106817000.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any Idea what I am doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 12:51:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-renderer-with-multipart-color-ramp/m-p/1264442#M8461</guid>
      <dc:creator>LukasWürsch</dc:creator>
      <dc:date>2023-03-06T12:51:50Z</dc:date>
    </item>
  </channel>
</rss>

