<?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: Pie Chart Field Name in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/pie-chart-field-name/m-p/1328481#M82216</link>
    <description>&lt;P&gt;Thank you so much!&lt;/P&gt;</description>
    <pubDate>Wed, 13 Sep 2023 20:12:41 GMT</pubDate>
    <dc:creator>JohnMax</dc:creator>
    <dc:date>2023-09-13T20:12:41Z</dc:date>
    <item>
      <title>Pie Chart Field Name</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/pie-chart-field-name/m-p/1328342#M82210</link>
      <description>&lt;P&gt;I created a pie chart in a popup using two field values (Field 18 and Field25).&amp;nbsp; When I hover on the pie chart it shows those field names which are meaningless.&amp;nbsp; I want to replace those field names with an alias or description of the field.&amp;nbsp; How can I do this?&amp;nbsp; My code is below.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chart.png" style="width: 370px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/80632i5F6936B13FF63B5E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Chart.png" alt="Chart.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;html lang="en"&amp;gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;&lt;BR /&gt;&amp;lt;meta&lt;BR /&gt;name="viewport"&lt;BR /&gt;content="initial-scale=1, maximum-scale=1,user-scalable=no"&lt;BR /&gt;/&amp;gt;&lt;BR /&gt;&amp;lt;title&amp;gt;&lt;BR /&gt;Multiple popup elements | Sample | ArcGIS Maps SDK for JavaScript 4.27&lt;BR /&gt;&amp;lt;/title&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;link&lt;BR /&gt;rel="stylesheet"&lt;BR /&gt;href="&lt;A href="https://js.arcgis.com/4.27/esri/themes/light/main.css" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.27/esri/themes/light/main.css&lt;/A&gt;"&lt;BR /&gt;/&amp;gt;&lt;BR /&gt;&amp;lt;script src="&lt;A href="https://js.arcgis.com/4.27/" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.27/&lt;/A&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;style&amp;gt;&lt;BR /&gt;html,&lt;BR /&gt;body,&lt;BR /&gt;#mapDiv {&lt;BR /&gt;height: 100%;&lt;BR /&gt;width: 100%;&lt;BR /&gt;margin: 0;&lt;BR /&gt;padding: 0;&lt;BR /&gt;}&lt;BR /&gt;&amp;lt;/style&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;require(["esri/Map", "esri/views/MapView", "esri/layers/FeatureLayer"], (&lt;BR /&gt;Map,&lt;BR /&gt;MapView,&lt;BR /&gt;FeatureLayer&lt;BR /&gt;) =&amp;gt; {&lt;BR /&gt;// setup the map&lt;BR /&gt;const map = new Map({&lt;BR /&gt;basemap: "hybrid"&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;const view = new MapView({&lt;BR /&gt;container: "mapDiv",&lt;BR /&gt;map: map,&lt;BR /&gt;center: [-113.58332, 37.10819],&lt;BR /&gt;zoom: 17,&lt;BR /&gt;// Since there are many elements, it is best to dock the popup so&lt;BR /&gt;// the elements display better rather than have to scroll through them all.&lt;BR /&gt;popup: {&lt;BR /&gt;dockEnabled: true,&lt;BR /&gt;dockOptions: {&lt;BR /&gt;buttonEnabled: false,&lt;BR /&gt;breakpoint: false&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;const featureLayer = new FeatureLayer({&lt;BR /&gt;url: "&lt;A href="https://agisprodvm.washco.utah.gov/arcgis/rest/services/Assessor/MapServer/14" target="_blank" rel="noopener"&gt;https://agisprodvm.washco.utah.gov/arcgis/rest/services/Assessor/MapServer/14&lt;/A&gt;",&lt;BR /&gt;popupTemplate: {&lt;BR /&gt;// autocasts as new PopupTemplate()&lt;BR /&gt;title: "",&lt;/P&gt;&lt;P&gt;// Set content elements in the order to display.&lt;BR /&gt;// The first element displayed here is the fieldInfos.&lt;BR /&gt;content: [&lt;BR /&gt;{&lt;BR /&gt;// You can set a media element within the popup as well. This&lt;BR /&gt;// can be either an image or a chart. You specify this within&lt;BR /&gt;// the mediaInfos. The following creates a pie chart in addition&lt;BR /&gt;// to two separate images. The chart is also set up to work with&lt;BR /&gt;// related tables. Similar to text elements, media can only be set within the content.&lt;BR /&gt;type: "media", // MediaContentElement&lt;BR /&gt;mediaInfos: [&lt;BR /&gt;{&lt;BR /&gt;title: "&amp;lt;b&amp;gt;Count by type&amp;lt;/b&amp;gt;",&lt;BR /&gt;type: "pie-chart",&lt;BR /&gt;caption: "",&lt;BR /&gt;value: {&lt;BR /&gt;fields: ["Field18", "Field25"],&lt;BR /&gt;normalizeField: null,&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;outFields: ["*"]&lt;BR /&gt;});&lt;BR /&gt;map.add(featureLayer);&lt;/P&gt;&lt;P&gt;});&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;body&amp;gt;&lt;BR /&gt;&amp;lt;div id="mapDiv"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 18:19:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/pie-chart-field-name/m-p/1328342#M82210</guid>
      <dc:creator>JohnMax</dc:creator>
      <dc:date>2023-09-13T18:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Field Name</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/pie-chart-field-name/m-p/1328475#M82215</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10278"&gt;@JohnMax&lt;/a&gt;&amp;nbsp;-&lt;/P&gt;&lt;P&gt;If you'd like to have a different label for the fields in your chart, you'll have to set the FieldInfos with the fields specified from the chart on the popupTemplate level:&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I updated your code to add the fieldInfos with labels so that the chart displays something different:&amp;nbsp;&lt;A href="https://codepen.io/laurenb14/pen/zYyzRqR?editors=1000" target="_blank"&gt;https://codepen.io/laurenb14/pen/zYyzRqR?editors=1000&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 19:35:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/pie-chart-field-name/m-p/1328475#M82215</guid>
      <dc:creator>LaurenBoyd</dc:creator>
      <dc:date>2023-09-13T19:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Field Name</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/pie-chart-field-name/m-p/1328481#M82216</link>
      <description>&lt;P&gt;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 20:12:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/pie-chart-field-name/m-p/1328481#M82216</guid>
      <dc:creator>JohnMax</dc:creator>
      <dc:date>2023-09-13T20:12:41Z</dc:date>
    </item>
  </channel>
</rss>

