Date Time Axis Range : Column Chart Axis « Chart « Flex






Date Time Axis Range

Date Time Axis Range
            

<!--
Code from Flex 4 Documentation "Using Adobe Flex 4".

This user guide is licensed for use under the terms of the Creative Commons Attribution 
Non-Commercial 3.0 License. 

This License allows users to copy, distribute, and transmit the user guide for noncommercial 
purposes only so long as 
  (1) proper attribution to Adobe is given as the owner of the user guide; and 
  (2) any reuse or distribution of the user guide contains a notice that use of the user guide is governed by these terms. 
The best way to provide notice is to include the following link. 
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/

-->

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="600"
    height="600">
    <mx:Script>
        import mx.collections.ArrayCollection;
        // To create a Date object, you pass "YYYY,MM,DD",
        // where MM is zero-based, to the Date() constructor.
        [Bindable]
        public var minDate:Date = new Date(2006, 11, 1);
        [Bindable]
        public var maxDate:Date = new Date(2007, 1, 1);
        [Bindable] public var myData:ArrayCollection = new
            ArrayCollection([
                {date: "11/03/2006", amt: 12345},
                {date: "12/02/2006", amt: 54331},
                {date: "1/03/2007", amt: 34343},
                {date: "2/05/2007", amt: 40299}
                ]);
      </mx:Script>
    <mx:Panel title="DateTimeAxis" width="100%" height="100%">
        <mx:ColumnChart id="mychart" dataProvider="{myData}"
            showDataTips="true">
            <mx:horizontalAxis>
                <mx:DateTimeAxis dataUnits="months" minimum="{minDate}"
                    maximum="{maxDate}" />
            </mx:horizontalAxis>
            <mx:series>
                <mx:ColumnSeries yField="amt" xField="date"
                    displayName="My Data" />
            </mx:series>
        </mx:ColumnChart>
    </mx:Panel>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.horizontal Axis Renderer for ColumnCharthorizontal Axis Renderer for ColumnChart
2.Axis Renderer for ColumnChartAxis Renderer for ColumnChart
3.vertical Axis Renderer for ColumnChartvertical Axis Renderer for ColumnChart
4.Create a ColumnChart control with the default axis locations (bottom and left).Create a ColumnChart control with the default axis locations (bottom and left).
5.Column Chart Axis LabelColumn Chart Axis Label
6.Set Axis label for Column chartSet Axis label for Column chart
7.Customize horizontalAxisRenderer and AxisRendererCustomize horizontalAxisRenderer and AxisRenderer
8.Customize axisStrokeCustomize axisStroke
9.use the secondHorizontalAxisRenderer and secondVerticalAxisRenderer properties to control the appearance of the secondary axisuse the secondHorizontalAxisRenderer and secondVerticalAxisRenderer properties to control the appearance of the secondary axis
10.The following example removes tick marks from the horizontal axis:The following example removes tick marks from the horizontal axis:
11.Adding axis titlesAdding axis titles
12.Set LinearAxis, and formats the values to include a dollar sign and a thousands separator.Set LinearAxis, and formats the values to include a dollar sign and a thousands separator.
13.Create two functions that access complex data for both the axis and the seriesCreate two functions that access complex data for both the axis and the series
14.Remove tick marks from the horizontal axisRemove tick marks from the horizontal axis