<?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 Adding a Custom Legend Entry in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-custom-legend-entry/m-p/1029320#M71836</link>
    <description>&lt;P&gt;I want to be able to add a custom legend entry that is a color ramp for a unique value renderer that is calculated off of a color range. I have several zip codes that are color coded based on a series of related values. Though the values are distinct in the renderer, they all come from the related ramp like that pictured.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichaelCollins6_0-1614030912342.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/6614i0E35FCEDBCBE41DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichaelCollins6_0-1614030912342.png" alt="MichaelCollins6_0-1614030912342.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I think I might be close to success with the following code recommended by &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1104"&gt;@RobertScheitlin__GISP&lt;/a&gt;, but ultimately the dom is re-rendered and it disappears.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;watchUtils.when(legend, "container", function() {
    aspect.after(legend, "scheduleRender", function(response) {
        legendEntry.appendChild(legendTitle);
        legendEntry.appendChild(legendRow);
        
        legendRow.appendChild(legendRowSymbol);
        legendRowSymbol.appendChild(rampRow);
        rampRow.appendChild(rampHolder);
        rampHolder.appendChild(colorRamp);

        legendRow.appendChild(legendRowDescription);
        legendRowDescription.appendChild(labelHolder);

        labelHolder.appendChild(lowLabel);
        labelHolder.appendChild(highLabel);
        target.appendChild(legendEntry);
    });
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas how to get some extra elements to show up in the Legend widget without completely rewriting the widget?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Mar 2021 13:53:38 GMT</pubDate>
    <dc:creator>MichaelCollins6</dc:creator>
    <dc:date>2021-03-01T13:53:38Z</dc:date>
    <item>
      <title>Adding a Custom Legend Entry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-custom-legend-entry/m-p/1029320#M71836</link>
      <description>&lt;P&gt;I want to be able to add a custom legend entry that is a color ramp for a unique value renderer that is calculated off of a color range. I have several zip codes that are color coded based on a series of related values. Though the values are distinct in the renderer, they all come from the related ramp like that pictured.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichaelCollins6_0-1614030912342.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/6614i0E35FCEDBCBE41DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichaelCollins6_0-1614030912342.png" alt="MichaelCollins6_0-1614030912342.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I think I might be close to success with the following code recommended by &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1104"&gt;@RobertScheitlin__GISP&lt;/a&gt;, but ultimately the dom is re-rendered and it disappears.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;watchUtils.when(legend, "container", function() {
    aspect.after(legend, "scheduleRender", function(response) {
        legendEntry.appendChild(legendTitle);
        legendEntry.appendChild(legendRow);
        
        legendRow.appendChild(legendRowSymbol);
        legendRowSymbol.appendChild(rampRow);
        rampRow.appendChild(rampHolder);
        rampHolder.appendChild(colorRamp);

        legendRow.appendChild(legendRowDescription);
        legendRowDescription.appendChild(labelHolder);

        labelHolder.appendChild(lowLabel);
        labelHolder.appendChild(highLabel);
        target.appendChild(legendEntry);
    });
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas how to get some extra elements to show up in the Legend widget without completely rewriting the widget?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 13:53:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-custom-legend-entry/m-p/1029320#M71836</guid>
      <dc:creator>MichaelCollins6</dc:creator>
      <dc:date>2021-03-01T13:53:38Z</dc:date>
    </item>
  </channel>
</rss>

