connect Geoprocessing Widget Result with Chart Widget

1937
2
04-19-2013 09:25 AM
FlorianHoedt2
New Contributor III
Hello dear ESRI Users,
I am currently searching the internet for a solution to connect the geoprocessing widgets output with the chart widget. Both parts work well as they are the only thing I would need is to drop the geoprocessing results into the chart widget as data.
I query a MySQL database with my geoprocessing service and the query resultset should be passed to the chart widget to get displayed nicely.
Dipping into the source code makes me feel quite uncomfortable about coding such a thing myself since my last visit of Flex is long in the past and I am not that experienced with it. Maybe there is a Tool I could drop into my application or some of you have nice tips on how to achieve this.
many thanks, Florian Hoedt
Tags (2)
0 Kudos
2 Replies
omega_cancer
Occasional Contributor II
I have not seen such a component yet but if you provide the code snippet of your geo tool executeComplete event handler, We can help you in this regard. executeComplete Event handler is can be in <fx:decleration> block. like this:

   <esri:Geoprocessor id="gp"
                           executeComplete="gpResult(event)"
                           fault="onGPFault(event)"
                           outSpatialReference="{myMap.spatialReference}"
                           processSpatialReference="{myMap.spatialReference}"
                           url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/GPServer/PopulationSummary"
                           useAMF="false"/>


here it is gpResult.
However if you want to work with this on your own here is link that would guide you to work with Charts:
http://blog.flexexamples.com/category/barchart/ and http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_08.html

Hope it would help you.
0 Kudos
FlorianHoedt2
New Contributor III
Hello,
thank you for those hints. I have started to extend the geoprocessing widget but stopped this since my attempts did not work and failed on initialize and destroyed the fancy widget configuration dialog in flexviewer.
So I started to create my own geoprocessing widget and built bottom up instead of top to heaven:

http://pastebin.com/800Sps6e

for some reason my gp wont ever call the gp_executeCompleteHandler(). The fault is not invoked either. The task on my ArcGIS Server is properly set up and could be used with the geoprocessing widget from flex viewer. My servers log tells me that the task was successfully invoked and that it send data back ("Answer: 5557 chars") - which seems to be a valid JSON answer for 8 features in a featurerecordset.
What am i doing wrong? I can not find it.
0 Kudos