Original User: ionara_wilson[ATTACH=CONFIG]22809[/ATTACH][ATTACH=CONFIG]22810[/ATTACH]I am using the pie chart example herehttp://help.arcgis.com/en/webapi/flex/samples/index.html#//01nq00000040000000to create an application with a column chart. However, in the ESRI example, the chart that I open gets to be on top of the others, but in mine I can see the other charts's icons overlap with my chart. How can I change the code to have the chart that I open, to be on top of the other chart's icons, as the ESRI sample? I am attaching images for comparison. Does anybody have any idea why this is happening? Thank you!!!Here is my snippet protected function myMap_initializeHandler(event:MapEvent):void { // Query to get the cities under the specified state var queryTask:QueryTask = new QueryTask(); queryTask.url = "http://tfsgis-iisd01:6080/arcgis/rest/services/Economic_Impacts_Trends/TrendsServiceYearsJoined/MapServer/0"; queryTask.useAMF = false; var expr:String = ""; /* expr = "YEAR_DATA = '2009'" */ expr = "1 = '1'" var query:Query = new Query(); query.outSpatialReference = myMap.spatialReference; query.outFields = [ "*"]; query.returnGeometry = true; query.where = expr; queryTask.execute(query, new AsyncResponder(onResult, onFault)); // add the graphic on the map function onResult(featureSet:FeatureSet, token:Object = null):void { for each (var myGraphic:Graphic in featureSet.features) { myGraphicsLayer.add(myGraphic); // creating an arraycollection from the graphic attributes var object:ArrayCollection = new ArrayCollection( [ { NAME: myGraphic.attributes.NAME, YEAR: "Industry Output Totals", VALUE: myGraphic.attributes.YEAR_DATA, TOTAL07: myGraphic.attributes.DirTotal_1, TOTAL09: myGraphic.attributes.DirTotal_5 }, ]); myGraphic.attributes = object; } } function onFault(info:Object, token:Object = null):void { Alert.show(info.toString()); } }
And the renderer:<?xml version="1.0" encoding="utf-8"?> <s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" clipAndEnableScrolling="true" creationComplete="creationCompleteHandler()" implements="mx.core.IDataRenderer"> <!-- This is used by the QueryResultsWithChart sample. --> <fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; .InfoCloseButton { disabledSkin: Embed(source="/assets/skins.swf", symbol="Callout_closeButtonDisabledSkin"); downSkin: Embed(source="/assets/skins.swf", symbol="Callout_closeButtonDownSkin"); overSkin: Embed(source="/assets/skins.swf", symbol="Callout_closeButtonOverSkin"); upSkin: Embed(source="/assets/skins.swf", symbol="Callout_closeButtonUpSkin"); } .InfoExpandButton { disabledSkin: Embed(source="/assets/skins.swf", symbol="Callout_expandButtonDisabledSkin"); downSkin: Embed(source="/assets/skins.swf", symbol="Callout_expandButtonDownSkin"); overSkin: Embed(source="/assets/skins.swf", symbol="Callout_expandButtonOverSkin"); upSkin: Embed(source="/assets/skins.swf", symbol="Callout_expandButtonUpSkin"); } </fx:Style> <fx:Script> <![CDATA[ private var _data:Object; [Bindable] // implement IDataRenderer public function get data():Object { return _data; } public function set data(value:Object):void { _data = value; } private var _expr:String; private function creationCompleteHandler():void { parent.addEventListener(MouseEvent.ROLL_OVER, rollOverHandler); parent.addEventListener(MouseEvent.ROLL_OUT, rollOutHandler); } private function rollOverHandler(event:MouseEvent):void { if (currentState == "normal") { currentState = "titleState"; } } private function rollOutHandler(event:MouseEvent):void { if (currentState == "titleState") { currentState = "normal"; } } private function expandButton_clickHandler():void { currentState = "detailState"; } private function closeButton_clickHandler():void { currentState = "normal"; } private function effectStartHandler():void { parent.removeEventListener(MouseEvent.ROLL_OVER, rollOverHandler); } private function effectEndHandler():void { parent.addEventListener(MouseEvent.ROLL_OVER, rollOverHandler); } ]]> </fx:Script> <s:states> <s:State name="normal"/> <s:State name="titleState"/> <s:State name="detailState"/> </s:states> <s:transitions> <s:Transition fromState="*" toState="*"> <s:Resize duration="250" effectEnd="effectEndHandler()" effectStart="effectStartHandler()" target="{this}"/> </s:Transition> </s:transitions> <s:HGroup id="titleBar" width="100%" height="30%" verticalAlign="middle"> <mx:Image id="pieChartImage" width="5" height="5" source="@Embed(source='/assets/ColumnChart2.png')"/> <s:Label id="titleLabel" fontSize="10" fontWeight="bold" includeIn="titleState,detailState" text="{data.getItemAt(0).NAME}"/> <mx:Button id="expandButton" width="18" height="18" click="expandButton_clickHandler()" includeIn="titleState" styleName="InfoExpandButton"/> <mx:Spacer width="100%" includeIn="detailState"/> <mx:Button id="closeButton" width="18" height="18" click="closeButton_clickHandler()" includeIn="detailState" styleName="InfoCloseButton"/> </s:HGroup> <mx:ColumnChart id="columnchart" showDataTips="true" selectionMode="multiple" width="150" height="150" dataProvider="{data}" includeIn="detailState" > <mx:horizontalAxis > <mx:CategoryAxis id="categoryaxis" dataProvider="{data}" categoryField="NAME" /> </mx:horizontalAxis> <mx:series> <mx:ColumnSeries interactive="true" labelField="NAME" id="column1" displayName="2007" xField = "NAME" yField="TOTAL07" dataProvider="{data}"/> <mx:ColumnSeries interactive="true" labelField="NAME" id="column2" displayName="2009" xField = "NAME" yField="TOTAL09" dataProvider="{data}"/> </mx:series> </mx:ColumnChart> <mx:Legend dataProvider="{data}" scaleX="0.3" scaleY="0.3"/> </s:VGroup>