I found for DatatTimeAxis if you set disabledRanges to the last date
of the month the label for next month gets dropped using property
labelUnits='months". Any ideas? Below is the code:

<?xml version="1.0"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>

        <mx:Script>
                <![CDATA[
                        import mx.collections.ArrayCollection;

                        [Bindable]
                        public var stockDataAC:ArrayCollection=new 
ArrayCollection([{date:
"2005, 6, 1",
                                        close: 30}, {date: "2005, 7, 31", 
close: 25}, {date: "2005, 8,
3",
                                        close: 40}, {date: "2005, 9, 4", close: 
30}, {date: "2005, 10,
5",
                                        close: 50}, {date: "2005, 11, 6", 
close: 43}]);
                        private var d:Date=new Date("7/31/2005");
                        [Bindable]
                        private var offDays:Array=[d];

                        public function myParseFunction(s:String):Date
                        {
                                // Get an array of Strings from the 
comma-separated String passed
in.
                                var a:Array=s.split(",");
                                // Create the new Date object. Subtract one from
                                // the month property because months are 
zero-based in
                                // the Date constructor.
                                var newDate:Date=new Date(a[0], a[1] - 1, a[2]);
                                return newDate;
                        }
                ]]>
        </mx:Script>

        <mx:Panel title="DateTimeAxis Example"
                          height="100%"
                          width="100%">

                <mx:LineChart id="mychart"
                                          height="100%"
                                          width="100%"
                                          paddingRight="5"
                                          paddingLeft="5"
                                          showDataTips="true"
                                          dataProvider="{stockDataAC}">

                        <mx:horizontalAxis>
                                <mx:DateTimeAxis dataUnits="days"
                                                                 
parseFunction="myParseFunction"
                                                                 
disabledRanges="{offDays}"
                                                                 
labelUnits="months"/>
                        </mx:horizontalAxis>

                        <mx:verticalAxis>
                                <mx:LinearAxis baseAtZero="false"/>
                        </mx:verticalAxis>

                        <mx:series>
                                <mx:LineSeries yField="close"
                                                           xField="date"
                                                           displayName="AAPL"/>
                        </mx:series>
                </mx:LineChart>

        </mx:Panel>
</mx:Application>

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to