Clear Up
SharpKit Reference

Time Class

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',
            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.

Namespace: Ext.chart.axis

Constructors

Fields

Name Description
dateFormat Indicates the format the date will be rendered on. For example: 'M d' will render the dates as 'Jan 30', etc. For a list of possible format strings see Date Defaults to: false
fromDate The starting date for the time axis. Defaults to: false
step 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.). Defaults to: [Ext.Date.DAY, 1].
toDate The ending date for the time axis. Defaults to: false
© Copyright 2005-2011 SharpKit. All rights reserved.