You are here: > ESRI Forums > arcgis server forums > Thread Replies

ArcGIS Server Forums

ArcGIS API for Flex forum

Chart and Statistics Widget for Sample Flex...   MG Sethe Aug 23, 2009
Re: Chart and Statistics Widget for Sample...   Robert Scheitlin Aug 24, 2009
Re: Chart and Statistics Widget for Sample...   MG Sethe Aug 24, 2009
Re: Chart and Statistics Widget for Sample...   MG Sethe Aug 24, 2009
Re: Chart and Statistics Widget for Sample...   Robert Scheitlin Aug 24, 2009
Re: Chart and Statistics Widget for Sample...   MG Sethe Aug 24, 2009
Re: Chart and Statistics Widget for Sample...   MG Sethe Sep 03, 2009
Re: Chart and Statistics Widget for Sample...   Robert Scheitlin Sep 03, 2009
Re: Chart and Statistics Widget for Sample...   MG Sethe Sep 04, 2009
Re: Chart and Statistics Widget for Sample...   Ivan Baehr Oct 19, 2009
Re: Chart and Statistics Widget for Sample...   MG Sethe Oct 19, 2009
Re: Chart and Statistics Widget for Sample...   Ivan Baehr Oct 19, 2009
Re: Chart and Statistics Widget for Sample...   MG Sethe Oct 19, 2009
Re: Chart and Statistics Widget for Sample...   Ivan Baehr Oct 20, 2009
Re: Chart and Statistics Widget for Sample...   MG Sethe Oct 20, 2009
Re: Chart and Statistics Widget for Sample...   Ivan Baehr Oct 20, 2009
Re: Chart and Statistics Widget for Sample...   MG Sethe Oct 20, 2009
Re: Chart and Statistics Widget for Sample...   Ivan Baehr Oct 22, 2009
Re: Chart and Statistics Widget for Sample...   MG Sethe Feb 26, 2010
Re: Chart and Statistics Widget for Sample...   Tom Jones May 06, 2010
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Chart and Statistics Widget for Sample Flex Viewer 
Author MG Sethe 
Date Aug 23, 2009 
Message I have download the Chart and statistics widget. i need to change the chart type from a pie to a bar / column or Line chart. Could you please point me to the correct place in the MXML code to change. I have replaced the code where a pie chart is reference , but the widget still display the Pie Chart

I am not good in programming, and still learning.

If anyone has changed the code to show a Bar Chart , Column or Line Chart , please share it with me.

Your assistance is highly appreciated.
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author Robert Scheitlin 
Date Aug 24, 2009 
Message Golden Sethe,

Attached is the modified version of the ChartWidget.mxml that changes the pie chart to a column chart instead. 
  Robert Scheitlin
GIS Manager
Calhoun County, Alabama 
  ChartWidget.txt (opens in new window)
 
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author MG Sethe 
Date Aug 24, 2009 
Message Thanks Robert for the quick response, this is exactly what i wanted to achieve,I will figure out how to achieve the same for a Line graph.

In the meantime this will serve the purpose of my project, the only thing that i noticed is , the percentage value to the summary field is left out for the series calculated.( eg, percentage of the population employed to the total population of a county)

Thanks again for the code.

 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author MG Sethe 
Date Aug 24, 2009 
Message Thanks Robert for the quick response, this is exactly what i wanted to achieve,I will figure out how to achieve the same for a Line graph.

In the meantime this will serve the purpose of my project, the only thing that i noticed is , the percentage value to the summary field is left out for the series calculated.( eg, percentage of the population employed to the total population of a county)

Thanks again for the code.

 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author Robert Scheitlin 
Date Aug 24, 2009 
Message Golden Sethe,

The percentage was actually part of the default behavior of the pie chart. I add that feature to the code in this attached version.

Don't forget to mark the question as answered. 
  Robert Scheitlin
GIS Manager
Calhoun County, Alabama 
  ChartWidget.txt (opens in new window)
 
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author MG Sethe 
Date Aug 24, 2009 
Message Thanks again, I will be analysing different data sets, As i mentioned earlier, i am also interested in the Line Chart, I am battling to get that as well. Should you try it, please pass the code to me as well.

I really appreciate your assistance.
Thanks a million. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author MG Sethe 
Date Sep 03, 2009 
Message Hi Robert,
One last question, I need to rotate the axis labels , where in the code should i make changes?.

Thanks

 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author Robert Scheitlin 
Date Sep 03, 2009 
Message Golden,

For the axis labels to be rotated the font that the labels use will have to be embeded. Then in the AxisRenderer just specify a rotation. 
  Robert Scheitlin
GIS Manager
Calhoun County, Alabama 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author MG Sethe 
Date Sep 04, 2009 
Message Thanks Robert, I have tried that, and i still do not get my labels rotated.

I have attached the MXML text file to look at the code. i might have done something incorrectly.

Your help is highly appreciated.


 
  BarChart_Embedding Fonts.txt (opens in new window)
 
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author Ivan Baehr 
Date Oct 19, 2009 
Message Thanks to Robert for sharing the code for the Column Chart Widget. I try to get it functioning in my application build on the Sample Flex Viewer.

The widget opens correct. But, when I define an area on the map with either of the select tools I just get the Loading icon and the error message:

[RPC Fault faultString="Server Error - Object reference not set to an instance of an object." faultCode="500" faultDetail=""]

Debug with break points the application stops at line 314 of the ChartWidget code:

// on result
function onResult(featureSet:FeatureSet, token:Object = null):void

It seems like the widget is searching for the service. I have checked the url's to map service and geometry service.

I have set up a Geometry Service named 'Geometry' on my ArcGIS Server and the map service has Spatial Reference: 32632. May I eventually be missing anything vital in the configuration of the Geometry Service?

Any suggestion and help to proceed is appreciated. I am a GIS person new to Flex and not a programmer.

Kind regards,

Ivan Baehr
SSI, Denmark
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author MG Sethe 
Date Oct 19, 2009 
Message Hi
Check if your ChartWidget.xml is configured to point to the correct layer that you need to chart.

Go to your ArcGIS service directory and make sure you have the correct layer number, " Your xml file config statement will look like this, http://yourserver/ArcGIS/rest/services/yourmapservice/MapServer/11"
You must also make sure you have the correct field names in the XML Config file.

If you dont get it right, sent me your XML file to look at it.

Hope this will help you. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author Ivan Baehr 
Date Oct 19, 2009 
Message Hi Golden Sethe

thanks for your quick response. I checked as suggested and run the application after building project again. Now I get the following error:

Error #1009: Cannot access a property or method of a null object reference.

I will try to attach the ChartWidget.xml

thanks for your support,

Ivan 
  ChartWidget.xml (opens in new window)
 
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author MG Sethe 
Date Oct 19, 2009 
Message Hi
Make sure the data frame is assigned with Spatial Reference. (Projection system)

You must also change bufferParameters.unit = null to bufferParameters.unit = 0 to avoid other errors that you might experience in future when you build.

I do not see anything wrong in you MXL Config file.
I have also attached my mxml file that works.

Hope this will help as well.

Thanks 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author Ivan Baehr 
Date Oct 20, 2009 
Message Thanks Golden

I changed bufferParameters.unit = null to bufferParameters.unit = 0 and checked again the spatial reference of the data frame and all layers. Projection system is WGS84 UTM Zone 32N.

However, running the application still returns the same error mesage: Error #1009: Cannot access a property or method of a null object reference.

you referred you would attach your mxml file that works. The attachment was missing or did you refer to previous attachment? I hope comparing with your file I may bring it to work. Your support is highly appreciated.

I am testing the application on the ArcGIS Server on our intranet.

Thanks,
Ivan
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author MG Sethe 
Date Oct 20, 2009 
Message Hi
Try to assign a known spatial reference in ArcMap.

Firstly, Go to the ArcGIS Service directory, check your mapservice spatial reference . You should get something like this "Spatial Reference: 54004 " depending on the projection system used.

If not,Open your project in ArcMap and assign the spatial reference in the dataframe properties.

Select the pre-defined coordinate system and choose projection system used in your area.
Save the project and restart your service, it should have known spatial reference code.

I have also attached my Code that works.

Hope this help.
Thanks

 
  ChartWidget.xml (opens in new window)
 
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author Ivan Baehr 
Date Oct 20, 2009 
Message Thanks Golden

The Spatial Reference of my map service is 32632.

I will try to test with your code. Although, it is an xml file it seems like the content is the mxml file. I will try to compare it with my mxml file.

I have attached my mxml file.

Thanks
Ivan 
  ChartWidget.zip (opens in new window)
 
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author MG Sethe 
Date Oct 20, 2009 
Message Just rename mine to ChartWidget.mxml.

I was sending it not compressed and was forced to rename. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author Ivan Baehr 
Date Oct 22, 2009 
Message Hi

I tried to run the application with your code. Needed to add the code below and to add a
Thanks
Ivan 
 
<BaseWidget	xmlns:esri			="http://www.esri.com/2008/ags" 
			xmlns				="com.esri.solutions.flexviewer.*" 
			xmlns:mx			="http://www.adobe.com/2006/mxml" 
			xmlns:mxeffects		="com.adobe.ac.mxeffects.*"
			xmlns:widgets		="com.esri.solutions.flexviewer.widgets.*"
			x					="600" 
			y					="300" 
			widgetConfigLoaded	="init()" xmlns:CustomWidgets="CustomWidgets.*">
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer and Enhanced SearchWidget with Floating DataGrid. 
Author MG Sethe 
Date Feb 26, 2010 
Message Hi Robert

Hi Robert , You helped with the Chart and Statistics Widget last time, I have dowloaded the "Enhanced SearchWidget with Floating DataGrid Widget" and was thinking of integrating it with SearchWidget to display the Chart in a separate window for the results. I would like to have an option to display the results in a separate Chart Window like it is In the Enhanced SearchWidget. Is this achievable?.Where do i start?.

Your assistance is highly appreciated.

 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Chart and Statistics Widget for Sample Flex Viewer 
Author Tom Jones 
Date May 06, 2010 
Message Hi

I'm developing a web mapping application using the sample flex viewer. I have successfully included the Charts and Statistics Widget.Although, I was wondering if anyone has managed to remove the pie chart that intitally appears. And is there a way to display more than 1 chart simultaneously or by choosing from a drop down list.

Thanks
Any help would be greatly appreciated :)

KYTE