<?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 Re: Column Chart - How to show different years side by side? in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/column-chart-how-to-show-different-years-side-by/m-p/577861#M13019</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found a solution: I had to change the columns in my feature service. Before I had two columns for each county, each representing the 2007 and 2009 data. I decided to keep just one column for each county and repeat the columns for the different years. It worked! Then on the code &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;function onResult(featureSet:FeatureSet, token:Object = null):void &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each (var myGraphic:Graphic in featureSet.features) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myGraphicsLayer.add(myGraphic); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // creating an arraycollection from the graphic attributes &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var object:ArrayCollection = new ArrayCollection( &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { NAME: myGraphic.attributes.NAME, YEAR: "Industry Output Totals", VALUE: myGraphic.attributes.YEAR_DATA, TOTAL07: myGraphic.attributes.DirTotal_1, TOTAL09: myGraphic.attributes.DirTotal_5 }, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myGraphic.attributes = object; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; function onFault(info:Object, token:Object = null):void &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show(info.toString()); &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;renderer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; &amp;lt;mx:ColumnChart id="columnchart" showDataTips="true" selectionMode="multiple"&amp;nbsp;&amp;nbsp; width="150" height="150" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataProvider="{data}"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; includeIn="detailState" &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt; &amp;nbsp; &amp;lt;mx:horizontalAxis&amp;nbsp;&amp;nbsp; &amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;mx:CategoryAxis id="categoryaxis" dataProvider="{data}" categoryField="NAME"&amp;nbsp; /&amp;gt; &amp;nbsp; &amp;lt;/mx:horizontalAxis&amp;gt; &amp;nbsp; &amp;lt;mx:series&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;mx:ColumnSeries interactive="true" labelField="NAME" id="column1" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; displayName="2007" xField = "NAME" yField="TOTAL07"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataProvider="{data}"/&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;lt;mx:ColumnSeries interactive="true" labelField="NAME" id="column2" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; displayName="2009" xField = "NAME" yField="TOTAL09"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataProvider="{data}"/&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;lt;/mx:series&amp;gt;&amp;nbsp;&amp;nbsp; &amp;lt;/mx:ColumnChart&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Mar 2013 19:29:56 GMT</pubDate>
    <dc:creator>ionarawilson1</dc:creator>
    <dc:date>2013-03-20T19:29:56Z</dc:date>
    <item>
      <title>Column Chart - How to show different years side by side?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/column-chart-how-to-show-different-years-side-by/m-p/577860#M13018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using the pie chart example here&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/flex/samples/index.html#//01nq00000040000000" rel="nofollow" target="_blank"&gt;http://help.arcgis.com/en/webapi/flex/samples/index.html#//01nq00000040000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to create an application with a column chart. I have two years of data, so I would like to show two bars, one for each year. However my column chart just shows data for one year. If the where expression says selects all records, ( expr = "1 = '1'") the charts still point show 2007. If I change the where expression to 2009, then I get 2009 data but not 2007. How can I change the code so I can show the bars for both years? I am including a screenshot of the chart. Thank you for any help!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt; &amp;lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:s="library://ns.adobe.com/flex/spark" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:mx="library://ns.adobe.com/flex/mx" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:esri="http://www.esri.com/2008/ags" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pageTitle="Economic Impacts - Trends"&amp;gt;&amp;nbsp; &amp;lt;!--&amp;nbsp; @@includeFiles com/esri/ags/samples/MyInfoRenderer.mxml&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:layout&amp;gt; &amp;nbsp; &amp;lt;s:VerticalLayout paddingTop="5"/&amp;gt;&amp;nbsp; &amp;lt;/s:layout&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fx:Style&amp;gt; &amp;nbsp; @namespace esri "http://www.esri.com/2008/ags"; &amp;nbsp;&amp;nbsp; &amp;nbsp; esri|InfoSymbolWindow { &amp;nbsp;&amp;nbsp; infoPlacementMode: none; &amp;nbsp;&amp;nbsp; infoPlacement:top; &amp;nbsp;&amp;nbsp; infoOffsetX: 12; &amp;nbsp;&amp;nbsp; infoOffsetY: 12; &amp;nbsp;&amp;nbsp; infoOffsetW: 6; &amp;nbsp;&amp;nbsp; borderThickness: 2; &amp;nbsp; }&amp;nbsp; &amp;lt;/fx:Style&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fx:Script&amp;gt; &amp;nbsp; &amp;lt;![CDATA[ &amp;nbsp;&amp;nbsp; import com.esri.ags.FeatureSet; &amp;nbsp;&amp;nbsp; import com.esri.ags.Graphic; &amp;nbsp;&amp;nbsp; import com.esri.ags.esri_internal; &amp;nbsp;&amp;nbsp; import com.esri.ags.events.MapEvent; &amp;nbsp;&amp;nbsp; import com.esri.ags.tasks.QueryTask; &amp;nbsp;&amp;nbsp; import com.esri.ags.tasks.supportClasses.Query; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; import mx.collections.ArrayCollection; &amp;nbsp;&amp;nbsp; import mx.controls.Alert; &amp;nbsp;&amp;nbsp; import mx.core.IDataRenderer; &amp;nbsp;&amp;nbsp; import mx.events.FlexEvent; &amp;nbsp;&amp;nbsp; import mx.rpc.AsyncResponder; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; protected function myMap_initializeHandler(event:MapEvent):void &amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; // Query to get the cities under the specified state &amp;nbsp;&amp;nbsp;&amp;nbsp; var queryTask:QueryTask = new QueryTask(); &amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.url = "http://tfsgis-iisd01:6080/arcgis/rest/services/Economic_Impacts_Trends/TrendsService/MapServer/0"; &amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.useAMF = false; &amp;nbsp;&amp;nbsp;&amp;nbsp; var expr:String = "";&amp;nbsp; /*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; expr = "YEAR_DATA = '2007'"&amp;nbsp; */ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; expr = "1 = '1'"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var query:Query = new Query(); &amp;nbsp;&amp;nbsp;&amp;nbsp; query.outSpatialReference = myMap.spatialReference; &amp;nbsp;&amp;nbsp;&amp;nbsp; query.outFields = [ "YEAR_DATA", "DirTotalInd", "DirTotalEmp", "NAME"]; &amp;nbsp;&amp;nbsp;&amp;nbsp; query.returnGeometry = true; &amp;nbsp;&amp;nbsp;&amp;nbsp; query.where = expr;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(query, new AsyncResponder(onResult, onFault)); &amp;nbsp;&amp;nbsp;&amp;nbsp; // add the graphic on the map &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; function onResult(featureSet:FeatureSet, token:Object = null):void &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each (var myGraphic:Graphic in featureSet.features) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myGraphicsLayer.add(myGraphic); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // creating an arraycollection from the graphic attributes &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var object:ArrayCollection = new ArrayCollection( &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { NAME: myGraphic.attributes.NAME, YEAR: "Industry Output Totals", VALUE: myGraphic.attributes.YEAR_DATA, TOTAL: myGraphic.attributes.DirTotalInd }, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myGraphic.attributes = object; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; function onFault(info:Object, token:Object = null):void &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show(info.toString()); &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ]]&amp;gt;&amp;nbsp; &amp;lt;/fx:Script&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fx:Declarations&amp;gt; &amp;nbsp; &amp;lt;esri:InfoSymbol id="infoSymbol" infoRenderer="MyInfoRenderer1"/&amp;gt;&amp;nbsp; &amp;lt;/fx:Declarations&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:Label fontSize="12" &amp;nbsp;&amp;nbsp;&amp;nbsp; fontWeight="bold" &amp;nbsp;&amp;nbsp;&amp;nbsp; text="Click a marker to see the InfoSymbol open up with a pie chart of its population data under different age groups"/&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:Map id="myMap" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; load="myMap_initializeHandler(event)" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; openHandCursorVisible="false"&amp;gt; &amp;nbsp; &amp;lt;esri:extent&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;esri:Extent&amp;nbsp; xmin="-10800000" ymin="3370000" xmax="-10370000" ymax="4100000"&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:spatialReference&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:SpatialReference wkid="102100"/&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:spatialReference&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;/esri:Extent&amp;gt; &amp;nbsp; &amp;lt;/esri:extent&amp;gt; &amp;nbsp; &amp;lt;esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/&amp;gt; &amp;nbsp; &amp;lt;esri:GraphicsLayer id="myGraphicsLayer" symbol="{infoSymbol}"/&amp;gt;&amp;nbsp; &amp;lt;/esri:Map&amp;gt;&amp;nbsp;&amp;nbsp; &amp;lt;/s:Application&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;And the renderer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt; &amp;lt;s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009" &amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:s="library://ns.adobe.com/flex/spark" &amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:mx="library://ns.adobe.com/flex/mx" &amp;nbsp;&amp;nbsp;&amp;nbsp; clipAndEnableScrolling="true" &amp;nbsp;&amp;nbsp;&amp;nbsp; creationComplete="creationCompleteHandler()" &amp;nbsp;&amp;nbsp;&amp;nbsp; implements="mx.core.IDataRenderer"&amp;gt;&amp;nbsp; &amp;lt;!--&amp;nbsp; This is used by the QueryResultsWithChart sample.&amp;nbsp; --&amp;gt;&amp;nbsp; &amp;lt;fx:Style&amp;gt; &amp;nbsp; @namespace s "library://ns.adobe.com/flex/spark"; &amp;nbsp; @namespace mx "library://ns.adobe.com/flex/mx"; &amp;nbsp;&amp;nbsp; &amp;nbsp; .InfoCloseButton { &amp;nbsp;&amp;nbsp; disabledSkin: Embed(source="/assets/skins.swf", symbol="Callout_closeButtonDisabledSkin"); &amp;nbsp;&amp;nbsp; downSkin: Embed(source="/assets/skins.swf", symbol="Callout_closeButtonDownSkin"); &amp;nbsp;&amp;nbsp; overSkin: Embed(source="/assets/skins.swf", symbol="Callout_closeButtonOverSkin"); &amp;nbsp;&amp;nbsp; upSkin: Embed(source="/assets/skins.swf", symbol="Callout_closeButtonUpSkin"); &amp;nbsp; } &amp;nbsp;&amp;nbsp; &amp;nbsp; .InfoExpandButton { &amp;nbsp;&amp;nbsp; disabledSkin: Embed(source="/assets/skins.swf", symbol="Callout_expandButtonDisabledSkin"); &amp;nbsp;&amp;nbsp; downSkin: Embed(source="/assets/skins.swf", symbol="Callout_expandButtonDownSkin"); &amp;nbsp;&amp;nbsp; overSkin: Embed(source="/assets/skins.swf", symbol="Callout_expandButtonOverSkin"); &amp;nbsp;&amp;nbsp; upSkin: Embed(source="/assets/skins.swf", symbol="Callout_expandButtonUpSkin"); &amp;nbsp; }&amp;nbsp; &amp;lt;/fx:Style&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fx:Script&amp;gt; &amp;nbsp; &amp;lt;![CDATA[ &amp;nbsp;&amp;nbsp; private var _data:Object; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; [Bindable] &amp;nbsp;&amp;nbsp; // implement IDataRenderer &amp;nbsp;&amp;nbsp; public function get data():Object &amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; return _data; &amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; public function set data(value:Object):void &amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; _data = value; &amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; private var _expr:String; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; private function creationCompleteHandler():void &amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; parent.addEventListener(MouseEvent.ROLL_OVER, rollOverHandler); &amp;nbsp;&amp;nbsp;&amp;nbsp; parent.addEventListener(MouseEvent.ROLL_OUT, rollOutHandler); &amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; private function rollOverHandler(event:MouseEvent):void &amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; if (currentState == "normal") &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; currentState = "titleState"; &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; private function rollOutHandler(event:MouseEvent):void &amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; if (currentState == "titleState") &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; currentState = "normal"; &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; private function expandButton_clickHandler():void &amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; currentState = "detailState"; &amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; private function closeButton_clickHandler():void &amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; currentState = "normal"; &amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; private function effectStartHandler():void &amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; parent.removeEventListener(MouseEvent.ROLL_OVER, rollOverHandler); &amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; private function effectEndHandler():void &amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; parent.addEventListener(MouseEvent.ROLL_OVER, rollOverHandler); &amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; ]]&amp;gt;&amp;nbsp; &amp;lt;/fx:Script&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:states&amp;gt; &amp;nbsp; &amp;lt;s:State name="normal"/&amp;gt; &amp;nbsp; &amp;lt;s:State name="titleState"/&amp;gt; &amp;nbsp; &amp;lt;s:State name="detailState"/&amp;gt;&amp;nbsp; &amp;lt;/s:states&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:transitions&amp;gt; &amp;nbsp; &amp;lt;s:Transition fromState="*" toState="*"&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;s:Resize duration="250" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; effectEnd="effectEndHandler()" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; effectStart="effectStartHandler()" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; target="{this}"/&amp;gt; &amp;nbsp; &amp;lt;/s:Transition&amp;gt;&amp;nbsp; &amp;lt;/s:transitions&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:HGroup id="titleBar" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width="100%" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; height="30%" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; verticalAlign="middle"&amp;gt; &amp;nbsp; &amp;lt;mx:Image id="pieChartImage" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width="5" height="5" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; source="@Embed(source='/assets/ColumnChart2.png')"/&amp;gt; &amp;nbsp; &amp;lt;s:Label id="titleLabel" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fontSize="10" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fontWeight="bold" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; includeIn="titleState,detailState" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text="{data.getItemAt(0).NAME}"/&amp;gt; &amp;nbsp; &amp;lt;mx:Button id="expandButton" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width="18" height="18" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; click="expandButton_clickHandler()" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; includeIn="titleState" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; styleName="InfoExpandButton"/&amp;gt; &amp;nbsp; &amp;lt;mx:Spacer width="100%" includeIn="detailState"/&amp;gt; &amp;nbsp; &amp;lt;mx:Button id="closeButton" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width="18" height="18" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; click="closeButton_clickHandler()" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; includeIn="detailState" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; styleName="InfoCloseButton"/&amp;gt;&amp;nbsp; &amp;lt;/s:HGroup&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mx:ColumnChart id="columnchart" showDataTips="true" selectionMode="multiple"&amp;nbsp;&amp;nbsp; width="150" height="150" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataProvider="{data}"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; includeIn="detailState" &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt; &amp;nbsp; &amp;lt;mx:horizontalAxis&amp;nbsp;&amp;nbsp; &amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;mx:CategoryAxis id="categoryaxis" dataProvider="{data}" categoryField="YEAR"&amp;nbsp; /&amp;gt; &amp;nbsp; &amp;lt;/mx:horizontalAxis&amp;gt; &amp;nbsp; &amp;lt;mx:series&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;mx:ColumnSeries interactive="true" labelField="NAME" id="column1" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; displayName="2007" xField = "YEAR" yField="TOTAL"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataProvider="{data}"/&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;lt;mx:ColumnSeries interactive="true"&amp;nbsp; id="column2" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; displayName="2009" xField = "YEAR" yField="TOTAL"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataProvider="{data}"/&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;lt;/mx:series&amp;gt;&amp;nbsp;&amp;nbsp; &amp;lt;/mx:ColumnChart&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;/s:VGroup&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 14:56:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/column-chart-how-to-show-different-years-side-by/m-p/577860#M13018</guid>
      <dc:creator>ionarawilson1</dc:creator>
      <dc:date>2013-03-20T14:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Column Chart - How to show different years side by side?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/column-chart-how-to-show-different-years-side-by/m-p/577861#M13019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found a solution: I had to change the columns in my feature service. Before I had two columns for each county, each representing the 2007 and 2009 data. I decided to keep just one column for each county and repeat the columns for the different years. It worked! Then on the code &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;function onResult(featureSet:FeatureSet, token:Object = null):void &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each (var myGraphic:Graphic in featureSet.features) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myGraphicsLayer.add(myGraphic); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // creating an arraycollection from the graphic attributes &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var object:ArrayCollection = new ArrayCollection( &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { NAME: myGraphic.attributes.NAME, YEAR: "Industry Output Totals", VALUE: myGraphic.attributes.YEAR_DATA, TOTAL07: myGraphic.attributes.DirTotal_1, TOTAL09: myGraphic.attributes.DirTotal_5 }, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myGraphic.attributes = object; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; function onFault(info:Object, token:Object = null):void &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show(info.toString()); &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;renderer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; &amp;lt;mx:ColumnChart id="columnchart" showDataTips="true" selectionMode="multiple"&amp;nbsp;&amp;nbsp; width="150" height="150" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataProvider="{data}"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; includeIn="detailState" &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt; &amp;nbsp; &amp;lt;mx:horizontalAxis&amp;nbsp;&amp;nbsp; &amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;mx:CategoryAxis id="categoryaxis" dataProvider="{data}" categoryField="NAME"&amp;nbsp; /&amp;gt; &amp;nbsp; &amp;lt;/mx:horizontalAxis&amp;gt; &amp;nbsp; &amp;lt;mx:series&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;mx:ColumnSeries interactive="true" labelField="NAME" id="column1" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; displayName="2007" xField = "NAME" yField="TOTAL07"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataProvider="{data}"/&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;lt;mx:ColumnSeries interactive="true" labelField="NAME" id="column2" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; displayName="2009" xField = "NAME" yField="TOTAL09"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataProvider="{data}"/&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;lt;/mx:series&amp;gt;&amp;nbsp;&amp;nbsp; &amp;lt;/mx:ColumnChart&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 19:29:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/column-chart-how-to-show-different-years-side-by/m-p/577861#M13019</guid>
      <dc:creator>ionarawilson1</dc:creator>
      <dc:date>2013-03-20T19:29:56Z</dc:date>
    </item>
  </channel>
</rss>

