<?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: Graph in popupTemplate in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graph-in-popuptemplate/m-p/524773#M48949</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is "Number of Local Employees" the name of field? &amp;nbsp;Make sure you specify the field &lt;STRONG&gt;name&lt;/STRONG&gt;, not the alias. &amp;nbsp;Also, please note that the above sample has many slices (even though only one field is specified) because it uses all the returned records for the specific feature accessed via the relationship which is available to the service. &amp;nbsp;If not using a relationship, then each value in the specified fields for that feature becomes a slice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Jul 2017 20:30:41 GMT</pubDate>
    <dc:creator>JohnGrayson</dc:creator>
    <dc:date>2017-07-12T20:30:41Z</dc:date>
    <item>
      <title>Graph in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graph-in-popuptemplate/m-p/524772#M48948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey There Esri Community!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having a little issue here with the graphs inside the popupTemplate.&lt;/P&gt;&lt;P&gt;I was looking at the following example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=popup-multipleelements" title="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=popup-multipleelements" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which does a great job in describing the process of creating a pie-chart inside the popupTemplate,&amp;nbsp;&lt;/P&gt;&lt;P&gt;However there is couple things that I don't get from this example that's crucial in order to make it work properly .&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp; type&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"media"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mediaInfos&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"&amp;lt;b&amp;gt;Count by type&amp;lt;/b&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"pie-chart"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; caption&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theme&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Grasshopper"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"relationships/0/Point_Count_COMMON"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; normalizeField&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tooltipField&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"relationships/0/COMMON"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; ‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;specifically this line:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt; fields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"relationships/0/Point_Count_COMMON"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I understand that we need to pass the fields which according to them the pie-chart is getting charted, however when I pass my field &lt;STRONG&gt;&lt;EM&gt;"Number Of Local Employees"&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;I get one full pie chart with one color, but that's granted I passed only one color, However in the posted code above, the example passes only one field as well and get multiple slices in the same pie chart.&lt;/P&gt;&lt;P&gt;This is somewhat crucial because when I look at the documentation for the &lt;STRONG&gt;&lt;EM&gt;tooltipField&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="/legacyfs/online/362208_Screen Shot 2017-07-12 at 3.31.50 PM.png" style="width: 620px; height: 447px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it says that it accepts only a string compared to the &lt;STRONG&gt;&lt;EM&gt;fields&lt;/EM&gt;&lt;/STRONG&gt; which accepts an array of strings, so in case I'm passing multiple fields I can only show one type of tooltip in relation to the entered &lt;STRONG&gt;&lt;EM&gt;field&lt;/EM&gt;&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;&lt;EM&gt;**&lt;/EM&gt;&lt;EM&gt;Regardless of that, I struggle to show any tooltip on hover.&amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as follows:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/362207_Screen Shot 2017-07-12 at 3.26.25 PM.png" style="width: 620px; height: 281px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate it if you guys can have a look at it and point out if I'm missing&amp;nbsp;missing,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Anton.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:52:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graph-in-popuptemplate/m-p/524772#M48948</guid>
      <dc:creator>AntonAntonenko</dc:creator>
      <dc:date>2021-12-11T22:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Graph in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graph-in-popuptemplate/m-p/524773#M48949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is "Number of Local Employees" the name of field? &amp;nbsp;Make sure you specify the field &lt;STRONG&gt;name&lt;/STRONG&gt;, not the alias. &amp;nbsp;Also, please note that the above sample has many slices (even though only one field is specified) because it uses all the returned records for the specific feature accessed via the relationship which is available to the service. &amp;nbsp;If not using a relationship, then each value in the specified fields for that feature becomes a slice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 20:30:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graph-in-popuptemplate/m-p/524773#M48949</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2017-07-12T20:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Graph in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graph-in-popuptemplate/m-p/524774#M48950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I managed to show my pie-chart, however the hover still missing, even though I'm passing only one field (I'm using the field name as you mentioned above) maybe it because the name of the field and the alias are the same?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, could you expand on this relationship concept? It seem's like showing multiple slices in a pie-chart is the way to go for me. How would I go about replicating the same result in my case ,when I'm working with JSON objects?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;fields&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;property accepts multiple fields, however the &lt;EM&gt;&lt;STRONG&gt;tooltipFields&lt;/STRONG&gt;&lt;/EM&gt; only accepts one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anton.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2017 15:57:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graph-in-popuptemplate/m-p/524774#M48950</guid>
      <dc:creator>AntonAntonenko</dc:creator>
      <dc:date>2017-07-17T15:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Graph in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graph-in-popuptemplate/m-p/524775#M48951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I had some major developments towards finding a solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I managed to precent a pie-chart and doing so in &amp;nbsp;a dynamic manner regardless of what kind of data I'm working with.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue I'm experiencing though in regards to the tooltip when hovering on each one of those slices:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="363459" alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/363459_Screen Shot 2017-07-19 at 2.17.05 PM.png" style="width: 620px; height: 658px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as you can see in the image for some reason whenever I'm hovering on the slices of the pie-chart the data of each of those slices gets presented to at the bottom left corner of this image (5-9 yrs:34) . Instead I would like to have it similar to the way they have it in this example:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=popup-multipleelements" title="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=popup-multipleelements"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now understand&amp;nbsp;that they working in their sandbox with hosted layer from their online tool (?), however in my case I'm working with locally fetched data from a JSON file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is how my popup tempalate looks like:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="363460" alt="" class="image-2 jive-image j-img-original" src="/legacyfs/online/363460_Screen Shot 2017-07-19 at 2.22.20 PM.png" style="width: 620px; height: 579px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I removed the&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;tooltipFields&lt;/STRONG&gt;&lt;/EM&gt; property because it wasn't working at all.&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the &lt;EM&gt;&lt;STRONG&gt;fields_to_present&lt;/STRONG&gt;&lt;/EM&gt; array hold the following items:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="363464" alt="" class="image-3 jive-image j-img-original" src="/legacyfs/online/363464_Screen Shot 2017-07-19 at 2.24.53 PM.png" style="width: 620px; height: 166px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 18:25:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graph-in-popuptemplate/m-p/524775#M48951</guid>
      <dc:creator>AntonAntonenko</dc:creator>
      <dc:date>2017-07-19T18:25:29Z</dc:date>
    </item>
  </channel>
</rss>

