<?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 Legend with Class Break Renderer normalization in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/legend-with-class-break-renderer-normalization/m-p/877322#M13713</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Building on the&amp;nbsp;&lt;A href="https://community.esri.com/thread/208699"&gt;setRenderer error getFieldsUsedInExpressions is not a function&lt;/A&gt;&amp;nbsp;question, I built a ClassBreakRenderer widget that has a classification field and a normalization field, plus a legend.&amp;nbsp; Normalization works with attributes from the feature class.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Class Break Renderer widget" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/395809_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I'm trying to build in a NULL value to the normalization field so that it can be set to null by default, leaving just the classification to set the map symbology.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var noSelect = {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;value: null,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;label: "none"&lt;BR /&gt; };&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I push this to an array that holds the field values, then loop through the field&amp;nbsp;values to add to the array.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var normFields = []; //normalization fields&lt;BR /&gt; normFields.push(noSelect); //add NULL value&lt;BR /&gt; arrayUtils.forEach(resp.fields,function(f){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;foption = {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;value: f.name,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;label: f.alias&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;normFields.push(foption);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The values are in the selection dropdown, but the null value does not work as expected. The previous value is retained as the normalization field. See attached code, and thank you immensely for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Feb 2018 15:21:26 GMT</pubDate>
    <dc:creator>DavidTreering2</dc:creator>
    <dc:date>2018-02-06T15:21:26Z</dc:date>
    <item>
      <title>Legend with Class Break Renderer normalization</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/legend-with-class-break-renderer-normalization/m-p/877322#M13713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Building on the&amp;nbsp;&lt;A href="https://community.esri.com/thread/208699"&gt;setRenderer error getFieldsUsedInExpressions is not a function&lt;/A&gt;&amp;nbsp;question, I built a ClassBreakRenderer widget that has a classification field and a normalization field, plus a legend.&amp;nbsp; Normalization works with attributes from the feature class.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Class Break Renderer widget" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/395809_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I'm trying to build in a NULL value to the normalization field so that it can be set to null by default, leaving just the classification to set the map symbology.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var noSelect = {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;value: null,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;label: "none"&lt;BR /&gt; };&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I push this to an array that holds the field values, then loop through the field&amp;nbsp;values to add to the array.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var normFields = []; //normalization fields&lt;BR /&gt; normFields.push(noSelect); //add NULL value&lt;BR /&gt; arrayUtils.forEach(resp.fields,function(f){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;foption = {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;value: f.name,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;label: f.alias&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;normFields.push(foption);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The values are in the selection dropdown, but the null value does not work as expected. The previous value is retained as the normalization field. See attached code, and thank you immensely for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Feb 2018 15:21:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/legend-with-class-break-renderer-normalization/m-p/877322#M13713</guid>
      <dc:creator>DavidTreering2</dc:creator>
      <dc:date>2018-02-06T15:21:26Z</dc:date>
    </item>
  </channel>
</rss>

