<?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 Using StatisticDefinition in a QueryTask in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-statisticdefinition-in-a-querytask/m-p/124558#M11597</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question about using QueryTask to do two things:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Identify unique value for a record in a graphics layer via mouseover.&amp;nbsp; This unique value (from a specified field) is used to create a barchart&lt;/P&gt;&lt;P&gt;2. Use StatisticDefinition to obtain the maximum value possible for all records in a field.&amp;nbsp; I want to use the max value to set the limit to the barchart length&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, I seem to be able to do only one or the other: If I obtain the maximum value, I can't get the graphicsLayer to display.&amp;nbsp; if I get the graphicsLayer to show, then the statisticDefinition doesn't work.&amp;nbsp; &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some help understanding how QueryTask works.&amp;nbsp; Can it only do one thing?&amp;nbsp; Should I make two queryTasks to manage my two actions?&amp;nbsp; If so, how do I synchronize them? &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm attaching my script (needs a mapservice that allows for modification of layer order and symbology to function) and an image showing how the horizontal bar chart works.&amp;nbsp; At this point, I'm looking for general suggestions, these two attachments are included only if it helps to better understand my question.&amp;nbsp; &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your input,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Nov 2014 22:23:45 GMT</pubDate>
    <dc:creator>DavidMarquardt</dc:creator>
    <dc:date>2014-11-25T22:23:45Z</dc:date>
    <item>
      <title>Using StatisticDefinition in a QueryTask</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-statisticdefinition-in-a-querytask/m-p/124558#M11597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question about using QueryTask to do two things:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Identify unique value for a record in a graphics layer via mouseover.&amp;nbsp; This unique value (from a specified field) is used to create a barchart&lt;/P&gt;&lt;P&gt;2. Use StatisticDefinition to obtain the maximum value possible for all records in a field.&amp;nbsp; I want to use the max value to set the limit to the barchart length&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, I seem to be able to do only one or the other: If I obtain the maximum value, I can't get the graphicsLayer to display.&amp;nbsp; if I get the graphicsLayer to show, then the statisticDefinition doesn't work.&amp;nbsp; &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some help understanding how QueryTask works.&amp;nbsp; Can it only do one thing?&amp;nbsp; Should I make two queryTasks to manage my two actions?&amp;nbsp; If so, how do I synchronize them? &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm attaching my script (needs a mapservice that allows for modification of layer order and symbology to function) and an image showing how the horizontal bar chart works.&amp;nbsp; At this point, I'm looking for general suggestions, these two attachments are included only if it helps to better understand my question.&amp;nbsp; &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your input,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 22:23:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-statisticdefinition-in-a-querytask/m-p/124558#M11597</guid>
      <dc:creator>DavidMarquardt</dc:creator>
      <dc:date>2014-11-25T22:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using StatisticDefinition in a QueryTask</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-statisticdefinition-in-a-querytask/m-p/124559#M11598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like QueryTask does not allow for geometry when using statistics:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from Query api for outStatistics parameter (&lt;A href="https://developers.arcgis.com/javascript/jsapi/query-amd.html#outstatistics" title="https://developers.arcgis.com/javascript/jsapi/query-amd.html#outstatistics"&gt;query-amd | API Reference | ArcGIS API for JavaScript&lt;/A&gt; &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt;"The definitions for one or more field-based statistic to be calculated. &lt;/SPAN&gt;&lt;CODE style="font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; color: #000000; background: #ffffff;"&gt;outStatistics&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt; is only supported on layers/tables where &lt;/SPAN&gt;&lt;CODE style="font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; color: #000000; background: #ffffff;"&gt;supportsStatistics&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt; is true. If &lt;/SPAN&gt;&lt;CODE style="font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; color: #000000; background: #ffffff;"&gt;outStatistics&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt; is specified the only other query parameters that will be used are &lt;/SPAN&gt;&lt;CODE style="font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; color: #000000; background: #ffffff;"&gt;groupByFieldsForStatistics&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt;, &lt;/SPAN&gt;&lt;CODE style="font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; color: #000000; background: #ffffff;"&gt;orderByFields&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt;, &lt;/SPAN&gt;&lt;CODE style="font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; color: #000000; background: #ffffff;"&gt;text&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt;, &lt;/SPAN&gt;&lt;CODE style="font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; color: #000000; background: #ffffff;"&gt;timeExtent&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt; and &lt;/SPAN&gt;&lt;CODE style="font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; color: #000000; background: #ffffff;"&gt;where&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt;."&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 15:07:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-statisticdefinition-in-a-querytask/m-p/124559#M11598</guid>
      <dc:creator>DavidMarquardt</dc:creator>
      <dc:date>2014-12-01T15:07:53Z</dc:date>
    </item>
  </channel>
</rss>

