<?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 control visual variable names when updating renderer / cluster config, and possible bug in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-control-visual-variable-names-when-updating/m-p/1541045#M85728</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I find that I am unable to control the automatic 'Number of features' text that appears above the automatic cluster size rendering (i.e., when I allow the cluster config to automatically define the size variable based on the cluster count).&amp;nbsp; Is there a way that this can be done without defining a custom renderer that has a static visual variable defined for the cluster size?&lt;/P&gt;&lt;P&gt;What's even more complicating, is that I think there is a bug when applying the feature reduction config with the automatic visual variable size: if I then turn off the feature reduction, the 'Number of features' label appears to be stuck in the legend. I find this happens both when I just turn the feature reduction by setting the featureReduction property to null, and when I also do that plus set the layer's renderer property to a new renderer.&amp;nbsp; In either case, if the layer's renderer has a size variable with a title defined in its legendOptions property, it remains labelled as 'Number of Features' in the actual legend widget.&lt;/P&gt;&lt;P&gt;I have demonstrated this in the following codePen:&amp;nbsp;&lt;A href="https://codepen.io/mleahy_cl/pen/mdNbrxM" target="_blank" rel="noopener"&gt;https://codepen.io/mleahy_cl/pen/mdNbrxM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When you open that, the sample app will start with a simple renderer that has a visual variable, and in the legend you'll see it has a title pre-defined.&lt;/P&gt;&lt;P&gt;Once you enable clustering, the label in the legend switches to 'Number of Features' (which I would like to override...in particular, this is because in the application I'm working on, the things depicted on the map are not called 'Features' by our end users).&amp;nbsp; Does anyone know how I can control this?&lt;/P&gt;&lt;P&gt;Now, disable the clustering...and notice that the original renderer is restored, as is the visual variable...but *not* its label.&amp;nbsp; It still says 'Number of Features'.&lt;/P&gt;&lt;P&gt;Is this expected, and/or does anyone have a suggestion for how it may be controlled?&lt;/P&gt;&lt;P&gt;Worst case, I could destroy and recreate the entire feature layer...but that seems like a last resort option.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Sep 2024 14:32:54 GMT</pubDate>
    <dc:creator>mleahy_cl</dc:creator>
    <dc:date>2024-09-23T14:32:54Z</dc:date>
    <item>
      <title>How to control visual variable names when updating renderer / cluster config, and possible bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-control-visual-variable-names-when-updating/m-p/1541045#M85728</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I find that I am unable to control the automatic 'Number of features' text that appears above the automatic cluster size rendering (i.e., when I allow the cluster config to automatically define the size variable based on the cluster count).&amp;nbsp; Is there a way that this can be done without defining a custom renderer that has a static visual variable defined for the cluster size?&lt;/P&gt;&lt;P&gt;What's even more complicating, is that I think there is a bug when applying the feature reduction config with the automatic visual variable size: if I then turn off the feature reduction, the 'Number of features' label appears to be stuck in the legend. I find this happens both when I just turn the feature reduction by setting the featureReduction property to null, and when I also do that plus set the layer's renderer property to a new renderer.&amp;nbsp; In either case, if the layer's renderer has a size variable with a title defined in its legendOptions property, it remains labelled as 'Number of Features' in the actual legend widget.&lt;/P&gt;&lt;P&gt;I have demonstrated this in the following codePen:&amp;nbsp;&lt;A href="https://codepen.io/mleahy_cl/pen/mdNbrxM" target="_blank" rel="noopener"&gt;https://codepen.io/mleahy_cl/pen/mdNbrxM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When you open that, the sample app will start with a simple renderer that has a visual variable, and in the legend you'll see it has a title pre-defined.&lt;/P&gt;&lt;P&gt;Once you enable clustering, the label in the legend switches to 'Number of Features' (which I would like to override...in particular, this is because in the application I'm working on, the things depicted on the map are not called 'Features' by our end users).&amp;nbsp; Does anyone know how I can control this?&lt;/P&gt;&lt;P&gt;Now, disable the clustering...and notice that the original renderer is restored, as is the visual variable...but *not* its label.&amp;nbsp; It still says 'Number of Features'.&lt;/P&gt;&lt;P&gt;Is this expected, and/or does anyone have a suggestion for how it may be controlled?&lt;/P&gt;&lt;P&gt;Worst case, I could destroy and recreate the entire feature layer...but that seems like a last resort option.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 14:32:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-control-visual-variable-names-when-updating/m-p/1541045#M85728</guid>
      <dc:creator>mleahy_cl</dc:creator>
      <dc:date>2024-09-23T14:32:54Z</dc:date>
    </item>
  </channel>
</rss>

