<?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: arcade popup chart with X/Y values in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-popup-chart-with-x-y-values/m-p/1547439#M61895</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;no, I did not find any solution yet&lt;/P&gt;</description>
    <pubDate>Thu, 10 Oct 2024 00:01:49 GMT</pubDate>
    <dc:creator>PierreloupDucroix</dc:creator>
    <dc:date>2024-10-10T00:01:49Z</dc:date>
    <item>
      <title>arcade popup chart with X/Y values</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-popup-chart-with-x-y-values/m-p/1397676#M58188</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;is it possible to create a popup chart in arcade, that shows X/Y coordinates, and not only Y numerical value for each X field.&lt;/P&gt;&lt;P&gt;Explanation : in the mapviewer, I can create a chart by referencing a numerical field and the corresponding numerical values :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PierreloupDucroix_0-1710819923984.png" style="width: 537px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/98395i3D67394FCD26C64A/image-dimensions/537x348?v=v2" width="537" height="348" role="button" title="PierreloupDucroix_0-1710819923984.png" alt="PierreloupDucroix_0-1710819923984.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here you can see that the X values are correctly distributed along the X axis.&lt;/P&gt;&lt;P&gt;However, when trying to replicate such a chart in Arcade, I cannot get the same result. Here is my code :&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var rels = FeatureSetByRelationshipName($feature, "mesures")
var attributes = {}
var fieldNames = [];
for (var rel in rels){
    var X = text(rel.X)
    attributes[X] = rel.Z
    Push(fieldNames, rel.X)
};
return {
  type: 'media',
  title : 'title',
  description : 'desc',
  attributes : attributes,  // replace this dictionary with your own key-value pairs,
  mediaInfos: [{
    type : 'linechart', //linechart | barchart | piechart | columnchart
    //title : '',
    //caption : '',
    altText : '', //altText will be read by screen readers
    value : {
      fields: fieldNames,  // choose what attributes to use in the chart
      //normalizeField : '',  // the name of the attribute to normalize by or value 
    }	  
  }]
}&lt;/LI-CODE&gt;&lt;P&gt;As far as I understand, I have to create a dictionary of key/value pairs for the attributes, and then a field name list for the fieldNames. Since the keys in my attributes' dictionary have to be a string, then the result (X values) is not distributed along the X axis, but only put side by side.&lt;/P&gt;&lt;P&gt;Is there a way to achieve that ?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 03:58:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-popup-chart-with-x-y-values/m-p/1397676#M58188</guid>
      <dc:creator>PierreloupDucroix</dc:creator>
      <dc:date>2024-03-19T03:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: arcade popup chart with X/Y values</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-popup-chart-with-x-y-values/m-p/1547432#M61892</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am having the same problem. My data has decimal values and I want to distribute them on a uniform scale on the x-axis.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Additionally, it only shows the first 10 out of 20 data points. Have you been able to solve it in any way?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 22:57:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-popup-chart-with-x-y-values/m-p/1547432#M61892</guid>
      <dc:creator>juanrios87</dc:creator>
      <dc:date>2024-10-09T22:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: arcade popup chart with X/Y values</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-popup-chart-with-x-y-values/m-p/1547439#M61895</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;no, I did not find any solution yet&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 00:01:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-popup-chart-with-x-y-values/m-p/1547439#M61895</guid>
      <dc:creator>PierreloupDucroix</dc:creator>
      <dc:date>2024-10-10T00:01:49Z</dc:date>
    </item>
  </channel>
</rss>

