AnsweredAssumed Answered

Using StatisticDefinition in a QueryTask

Question asked by dmarquardt on Nov 25, 2014
Latest reply on Dec 1, 2014 by dmarquardt

Hello,

 

I have a question about using QueryTask to do two things:

 

1. Identify unique value for a record in a graphics layer via mouseover.  This unique value (from a specified field) is used to create a barchart

2. Use StatisticDefinition to obtain the maximum value possible for all records in a field.  I want to use the max value to set the limit to the barchart length

 

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.  if I get the graphicsLayer to show, then the statisticDefinition doesn't work. 

 

I need some help understanding how QueryTask works.  Can it only do one thing?  Should I make two queryTasks to manage my two actions?  If so, how do I synchronize them?

 

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.  At this point, I'm looking for general suggestions, these two attachments are included only if it helps to better understand my question. 

 

Thank you for your input,

 

David

Outcomes