<?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: Detailed/nitpicky customization of Legend in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160613#M14998</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, after months of working on other things, I inadvertently stumbled upon a work-around that removed the field name from the legend.&amp;nbsp; I'm now using version 3.16.&lt;/P&gt;&lt;P&gt;I set the attributeField property of the ClassBreaksRenderer to a function (instead of just giving it the name of a field).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the line of code that creates my ClassBreaksRenderer is:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;flyrRenderer = new CBRenderer(null, rendfunc0);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the function that determines the values (located just above the renderer-creating line) is:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;rendfunc0 = function(feature)&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var value = (feature.attributes)[field];
&amp;nbsp;&amp;nbsp;&amp;nbsp; return value;
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I kept everything else the same - setting class breaks, symbols, etc.&amp;nbsp; And now there is no field name showing up in the legend.&lt;/P&gt;&lt;P&gt;This accomplishes the task I was setting out to do...&amp;nbsp; There may be a better answer out there (perhaps in JS API 4?).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 08:27:31 GMT</pubDate>
    <dc:creator>ZoeZaloudek</dc:creator>
    <dc:date>2021-12-11T08:27:31Z</dc:date>
    <item>
      <title>Detailed/nitpicky customization of Legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160603#M14988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’m sure I’m just one line of code away from getting this to work just right!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my code, I have a feature layer that is being symbolized with a class breaks renderer.&amp;nbsp; I also have a Legend (Dijit?).&amp;nbsp; The Title, color swatches and class labels are all showing up OK.&amp;nbsp; However, the legend is also showing what attribute field the renderer is using.&amp;nbsp; I’m guessing that I just need to add a line and use CSS (esriLegendServiceLabel?) to get this to go away, but I just can’t quite figure out what to put.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here’s a screenshot. I circled the field name that I want not to display in light blue.&lt;/P&gt;&lt;P&gt; &lt;IMG alt="currentlegend.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/130453_currentlegend.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 17:48:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160603#M14988</guid>
      <dc:creator>ZoeZaloudek</dc:creator>
      <dc:date>2015-10-09T17:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed/nitpicky customization of Legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160604#M14989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Zoe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this website to help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.google.com/web/tools/iterate/inspect-styles/basics" title="https://developers.google.com/web/tools/iterate/inspect-styles/basics"&gt;Inspect and Tweak Your Pages: the Basics — Web Fundamentals&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you post the link to your site I can help more&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 18:00:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160604#M14989</guid>
      <dc:creator>RickeyFight</dc:creator>
      <dc:date>2015-10-09T18:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed/nitpicky customization of Legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160605#M14990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you're on the right track. esriLegendServiceLabel is a CSS class so you should just be able to add an additional block of CSS into your project's CSS file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;.esriLegendServiceLabel {
&amp;nbsp;&amp;nbsp;&amp;nbsp; display: none;
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's not honoring this CSS modifier, try this instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;.esriLegendServiceLabel {
&amp;nbsp;&amp;nbsp;&amp;nbsp; display: none !important;
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this with ESRI's &lt;A href="http://developers.arcgis.com/javascript/samples/widget_legend/" rel="nofollow noopener noreferrer" target="_blank"&gt;Legend demo&lt;/A&gt; and that eliminated the layer name like you're looking to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:27:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160605#M14990</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2021-12-11T08:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed/nitpicky customization of Legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160606#M14991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, FIrefox has an inspector as well. I haven't used it much, but now's a good time to start, right!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the link to our &lt;A href="http://mrcc.isws.illinois.edu/gismaps/elnino.htm"&gt;ENSO Comparison Tool.&lt;/A&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 20:35:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160606#M14991</guid>
      <dc:creator>ZoeZaloudek</dc:creator>
      <dc:date>2015-10-09T20:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed/nitpicky customization of Legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160607#M14992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This was interesting.&amp;nbsp; So, I added this line to the &amp;lt;style&amp;gt; section of my htm file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14444236244837342" data-renderedposition="50_8_912_16" jivemacro_uid="_14444236244837342"&gt;&lt;P&gt;.esriLegendLayerLabel{display:none !important; } &lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the field name was still showing in the legend. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, then I switched the version of the API I was referencing... I changed from 3.14 back to 3.13.&amp;nbsp; And that seemed to do the trick, the field name was not showing any more.&amp;nbsp; Unfortunately, I was purposely using 3.14 because can easily round/pad the decimal numbers for polygon labels in my feature layer...&amp;nbsp; So for now at least, I guess we'll just have to decide which is more important to us.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 20:51:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160607#M14992</guid>
      <dc:creator>ZoeZaloudek</dc:creator>
      <dc:date>2015-10-09T20:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed/nitpicky customization of Legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160608#M14993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Whoops. I think I copied the name of the CSS class incorrectly. Switch your CSS to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.esriLegendServiceLabel {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; display: none !important;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 22:06:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160608#M14993</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2015-10-09T22:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed/nitpicky customization of Legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160609#M14994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Upon closer inspection, you did put ServiceLabel the first time.&amp;nbsp; I was trying LayerLabel for whatever reason.&lt;/P&gt;&lt;P&gt;So, I tried ServiceLabel in place of LayerLabel.&amp;nbsp; It did remove the title from the legend (&lt;SPAN class="esriLegendServiceLabel"&gt;August 2015, Average Temperature (°F) ), but the field name (Temp) was still there.&lt;/SPAN&gt;..&lt;/P&gt;&lt;P&gt;&lt;IMG alt="currentlegend2.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/130477_currentlegend2.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 22:17:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160609#M14994</guid>
      <dc:creator>ZoeZaloudek</dc:creator>
      <dc:date>2015-10-09T22:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed/nitpicky customization of Legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160610#M14995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LegendLayerLabel looks more like the correct CSS class to target. I haven't used the legend widget so I don't have any experience with it so I'm basing my observations on the ESRI samples that use the widget. From what I can see in &lt;A href="http://developers.arcgis.com/javascript/samples/gp_resultmapservice/"&gt;this sample&lt;/A&gt;, the label you want to get rid of does not have an ID or assigned a CSS class directly. The label appears to be a child element inside an HTML table which DOES get assigned the CSS class esriLegendLayerLabel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should work but I can't tell why it's not working for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 22:28:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160610#M14995</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2015-10-09T22:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed/nitpicky customization of Legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160611#M14996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And only using version 3.14 .&amp;nbsp; When I switch to version 3.13, the attribute field name doesn't show up.&amp;nbsp; At least this has been a learning experience, I've never really used the Inspector before.&amp;nbsp; Maybe I just need to learn to create my own Legend from scratch without using the widget.&amp;nbsp; That will probably satisfy the control freak in me &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp; Thanks for your suggestions!&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 23:50:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160611#M14996</guid>
      <dc:creator>ZoeZaloudek</dc:creator>
      <dc:date>2015-10-09T23:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed/nitpicky customization of Legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160612#M14997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't know if it helps, but &lt;A href="http://blogs.esri.com/esri/arcgis/2014/09/24/data-visualization-with-arcgis-api-for-javascript-enhancement-options/"&gt;this&lt;/A&gt; blog post suggests adding a title in order to remove it. Not sure how that works exactly &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P style="margin-bottom: 10px; font-family: Arial, Helvetica, sans-serif; color: #333333; background: #ffffff;"&gt;Don’t like layer title displayed by default? Add the &lt;CODE style="font-family: Monaco, Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace; font-size: 13px; background: transparent;"&gt;title&lt;/CODE&gt; property into the &lt;CODE style="font-family: Monaco, Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace; font-size: 13px; background: transparent;"&gt;layerInfos&lt;/CODE&gt; array.&lt;/P&gt;&lt;P style="margin-bottom: 10px; font-family: Arial, Helvetica, sans-serif; color: #333333; background: #ffffff;"&gt;&lt;CODE style="font-family: Monaco, Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace; font-size: 13px; background: transparent;"&gt;layerInfos: [{&lt;BR /&gt;&amp;nbsp; layer: layer,&lt;BR /&gt;&amp;nbsp; title: "National Park Statistics 2013"&lt;BR /&gt;}]&lt;/CODE&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe title: "" would clear it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been struggling to produce a legend, and I don't think this widget works very well. Probably it is best to roll our own.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 17:32:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160612#M14997</guid>
      <dc:creator>JonMorris2</dc:creator>
      <dc:date>2015-10-19T17:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed/nitpicky customization of Legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160613#M14998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, after months of working on other things, I inadvertently stumbled upon a work-around that removed the field name from the legend.&amp;nbsp; I'm now using version 3.16.&lt;/P&gt;&lt;P&gt;I set the attributeField property of the ClassBreaksRenderer to a function (instead of just giving it the name of a field).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the line of code that creates my ClassBreaksRenderer is:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;flyrRenderer = new CBRenderer(null, rendfunc0);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the function that determines the values (located just above the renderer-creating line) is:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;rendfunc0 = function(feature)&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var value = (feature.attributes)[field];
&amp;nbsp;&amp;nbsp;&amp;nbsp; return value;
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I kept everything else the same - setting class breaks, symbols, etc.&amp;nbsp; And now there is no field name showing up in the legend.&lt;/P&gt;&lt;P&gt;This accomplishes the task I was setting out to do...&amp;nbsp; There may be a better answer out there (perhaps in JS API 4?).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:27:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160613#M14998</guid>
      <dc:creator>ZoeZaloudek</dc:creator>
      <dc:date>2021-12-11T08:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed/nitpicky customization of Legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160614#M14999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just wanted to chime in that I was working on the same problem in the JavaScript 4.2 API and adding this to my &amp;lt;style&amp;gt; section in my html doc worked for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.esri-legend__layer-caption {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; display: none !important;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This thread helped me narrow a solution down and it's been on my list of things to figure out for awhile, so thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2017 03:03:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detailed-nitpicky-customization-of-legend/m-p/160614#M14999</guid>
      <dc:creator>JosephPeters1</dc:creator>
      <dc:date>2017-02-26T03:03:19Z</dc:date>
    </item>
  </channel>
</rss>

