Hi, I have a Cartesian chart and I have the horizontal axis renderer set to canDropLabels to true. I am reading my category axis from a file and in certain cases when I resize my window, all labels seem to be dropped. If I set my category axis from inside my flex app instead of relying on the xml file, it seems to drop labels just fine. Here is some sample code showing the problem
I've tried this in flex 2.01 hotfix 3. Is there something I'm doing wrong? Is this a bug in flex? Thanks. test.xml <?xml version="1.0" encoding="utf-8"?> <series> <value x="12 AM">123</value> <value x="1 AM">123</value> <value x="2 AM">143</value> <value x="3 AM">133</value> <value x="4 AM">123</value> <value x="5 AM">153</value> <value x="6 AM">173</value> <value x="7 AM">133</value> <value x="8 AM">123</value> <value x="9 AM">153</value> <value x="10 AM">173</value> <value x="11 AM">143</value> <value x="12 AM">123</value> <value x="1 PM">173</value> <value x="2 PM">123</value> <value x="3 PM">153</value> <value x="4 PM">173</value> <value x="5 PM">133</value> <value x="6 PM">123</value> <value x="7 PM">153</value> <value x="8 PM">173</value> <value x="9 PM">143</value> <value x="10 PM">0</value> <value x="11 PM">0</value> </series> And the application <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="httpService.send()"> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; [Bindable] public var resultArray:ArrayCollection = new ArrayCollection(); [Bindable] private var categoryArray : ArrayCollection = new ArrayCollection(['12 AM','1 AM','2 AM','3 AM', '4AM','5AM','6AM','7AM','8 AM','9 AM','10 AM','11 AM','12 PM','1 PM','2 PM','3 PM','4PM','5 PM','6 PM','7 PM','8 PM','9 PM','10 PM','11 PM']); private function doResult(event : ResultEvent) : void { resultArray = event.result.series.value; } ]]> </mx:Script> <mx:HTTPService id="httpService" url="test.xml" result="doResult(event)"/> <mx:CartesianChart id="columnchart1" width="100%" height="100%" dataProvider="{resultArray}"> <!-- uncomment this horizontal axis to use the category array defined in flex. --> <!-- <mx:horizontalAxis> <mx:CategoryAxis dataProvider="{categoryArray}"/> </mx:horizontalAxis> --> <!-- This horizontal axis relies on the category fields as defined in the xml file --> <mx:horizontalAxis> <mx:CategoryAxis categoryField="x"/> </mx:horizontalAxis> <mx:horizontalAxisRenderer> <mx:AxisRenderer canDropLabels="true" canStagger="false"/> </mx:horizontalAxisRenderer> <mx:series> <mx:ColumnSeries yField="value"/> </mx:series> </mx:CartesianChart> </mx:Application>