For up to date documentation and features, visit http://docs.sencha.com/ext-js/4-0

## Sencha Documentation

# Ext.chart.axis.Time

####

    HierarchyExt.chart.axis.AbstractExt.chart.axis.AxisExt.chart.axis.Time

A type of axis whose units are measured in time values. Use this axis for listing dates that you will want to group or dynamically change. If you just want to display dates as categories then use the Category class for axis instead.

For example:

    axes: [{
        type: 'Time',
        position: 'bottom',
        fields: 'date',
        title: 'Day',
        dateFormat: 'M d',
        groupBy: 'year,month,day',
        aggregateOp: 'sum',

        constrain: true,
        fromDate: new Date('1/1/11'),
        toDate: new Date('1/7/11')
    }]

In this example we're creating a time axis that has as title Day. The field the axis is bound to is `date`. The date format to use to display the text for the axis labels is `M d` which is a three letter month abbreviation followed by the day number. The time axis will show values for dates between `fromDate` and `toDate`. Since `constrain` is set to true all other values for other dates not between the fromDate and toDate will not be displayed.

Defined By

### Config Options

#### Other Configs

Ext.chart.axis.Axis
view source
dashSize : Number

The size of the dash marker. Default's 3.

The size of the dash marker. Default's 3.

Ext.chart.axis.Axis
view source
length : Number

Offset axis position. Default's 0.

Offset axis position. Default's 0.

Ext.chart.axis.Axis
view source
majorTickSteps : Number

If `minimum` and `maximum` are specified it forces the number of major ticks to the specified value.

If `minimum` and `maximum` are specified it forces the number of major ticks to the specified value.

Ext.chart.axis.Axis
view source
minorTickSteps : Number

The number of small ticks between two major ticks. Default is zero.

The number of small ticks between two major ticks. Default is zero.

Ext.chart.axis.Axis
view source
position : String

Where to set the axis. Available options are `left`, `bottom`, `right`, `top`. Default's `bottom`.

Where to set the axis. Available options are `left`, `bottom`, `right`, `top`. Default's `bottom`.

Ext.chart.axis.Axis
view source
width : Number

Offset axis width. Default's 0.

Offset axis width. Default's 0.

Defined By

### Properties

Ext.chart.axis.Time
view source
aggregateOp : String

Aggregation operation when grouping. Possible options are 'sum', 'avg', 'max', 'min'. Default's 'sum'.

Aggregation operation when grouping. Possible options are 'sum', 'avg', 'max', 'min'. Default's 'sum'.

Ext.chart.axis.Time
view source
calculateByLabelSize : Boolean

The minimum value drawn by the axis. If not set explicitly, the axis minimum will be calculated automatically.

The minimum value drawn by the axis. If not set explicitly, the axis minimum will be calculated automatically.

Ext.chart.axis.Time
view source
constrain : Boolean
If true, the values of the chart will be rendered only if they belong between the fromDate and toDate. If false, the ...

If true, the values of the chart will be rendered only if they belong between the fromDate and toDate. If false, the time axis will adapt to the new values by adding/removing steps. Default's [Ext.Date.DAY, 1].

Ext.chart.axis.Time
view source
dateFormat : String|Boolean

Indicates the format the date will be rendered on. For example: 'M d' will render the dates as 'Jan 30', etc.

Indicates the format the date will be rendered on. For example: 'M d' will render the dates as 'Jan 30', etc.

Ext.chart.axis.Time
view source
fromDate : Date

The starting date for the time axis.

The starting date for the time axis.

Ext.chart.axis.Time
view source
step : Array
An array with two components: The first is the unit of the step (day, month, year, etc). The second one is the number...

An array with two components: The first is the unit of the step (day, month, year, etc). The second one is the number of units for the step (1, 2, etc.). Default's [Ext.Date.DAY, 1].

Ext.chart.axis.Time
view source
timeUnit : String
Indicates the time unit to use for each step. Can be 'day', 'month', 'year' or a comma-separated combination of all o...

Indicates the time unit to use for each step. Can be 'day', 'month', 'year' or a comma-separated combination of all of them. Default's 'year,month,day'.

Ext.chart.axis.Time
view source
toDate : Date

The ending date for the time axis.

The ending date for the time axis.

Defined By

### Methods

Ext.chart.axis.Time
view source
Time : void

### Returns

- void

Ext.chart.axis.Axis
view source
drawAxis( Object init) : void

Renders the axis into the screen and updates it's position.

Renders the axis into the screen and updates it's position.

### Parameters

- init : Object

### Returns

- void

Ext.chart.axis.Axis
view source
drawGrid : void

Renders an horizontal and/or vertical grid into the Surface.

Renders an horizontal and/or vertical grid into the Surface.

### Returns

- void

Ext.chart.axis.Axis
view source
drawLabel : void

Renders the labels in the axes.

Renders the labels in the axes.

### Returns

- void

Ext.chart.axis.Axis
view source
setTitle( String title) : void

Updates the title of this axis.

Updates the title of this axis.

### Parameters

- title : String

### Returns

- void