用于 Adobe® Flash® Platform 的 ActionScript® 3.0 参考
主页  |  隐藏包列表和类列表 |   |   |  新增内容  |  索引  |  附录  |  为什么显示为英语?
过滤条件: AIR 30.0 和更早版本, Flash Player 30.0 和更早版本, Flash Lite 4
Flex 4.6 和更早版本, Flash Pro CS6 和更早版本
隐藏过滤条件
mx.charts 

DateTimeAxis  - AS3 Flex

x

顶级
adobe.utils
air.desktop
air.net
air.update
air.update.events
coldfusion.air
coldfusion.air.errors
coldfusion.air.events
coldfusion.service
coldfusion.service.events
coldfusion.service.mxml
com.adobe.acm.solutions.authoring.domain.extensions
com.adobe.acm.solutions.ccr.domain.extensions
com.adobe.consulting.pst.vo
com.adobe.dct.component
com.adobe.dct.component.datadictionary
com.adobe.dct.component.datadictionaryElement
com.adobe.dct.component.dataElementsPanel
com.adobe.dct.component.toolbars
com.adobe.dct.event
com.adobe.dct.exp
com.adobe.dct.model
com.adobe.dct.service
com.adobe.dct.service.provider
com.adobe.dct.transfer
com.adobe.dct.util
com.adobe.dct.view
com.adobe.ep.taskmanagement.domain
com.adobe.ep.taskmanagement.event
com.adobe.ep.taskmanagement.filter
com.adobe.ep.taskmanagement.services
com.adobe.ep.taskmanagement.util
com.adobe.ep.ux.attachmentlist.component
com.adobe.ep.ux.attachmentlist.domain
com.adobe.ep.ux.attachmentlist.domain.events
com.adobe.ep.ux.attachmentlist.domain.renderers
com.adobe.ep.ux.attachmentlist.skin
com.adobe.ep.ux.attachmentlist.skin.renderers
com.adobe.ep.ux.content.event
com.adobe.ep.ux.content.factory
com.adobe.ep.ux.content.handlers
com.adobe.ep.ux.content.managers
com.adobe.ep.ux.content.model.asset
com.adobe.ep.ux.content.model.preview
com.adobe.ep.ux.content.model.relation
com.adobe.ep.ux.content.model.search
com.adobe.ep.ux.content.model.toolbar
com.adobe.ep.ux.content.search
com.adobe.ep.ux.content.services
com.adobe.ep.ux.content.services.load
com.adobe.ep.ux.content.services.permissions
com.adobe.ep.ux.content.services.preview
com.adobe.ep.ux.content.services.providers
com.adobe.ep.ux.content.services.query
com.adobe.ep.ux.content.services.relationships
com.adobe.ep.ux.content.services.search.lccontent
com.adobe.ep.ux.content.services.version
com.adobe.ep.ux.content.view
com.adobe.ep.ux.content.view.components.activate
com.adobe.ep.ux.content.view.components.grid
com.adobe.ep.ux.content.view.components.grid.hover
com.adobe.ep.ux.content.view.components.grid.hover.component
com.adobe.ep.ux.content.view.components.grid.renderers
com.adobe.ep.ux.content.view.components.relationships
com.adobe.ep.ux.content.view.components.review
com.adobe.ep.ux.content.view.components.search.renderers
com.adobe.ep.ux.content.view.components.searchpod
com.adobe.ep.ux.content.view.components.toolbar
com.adobe.ep.ux.content.view.components.toolbar.controlRenderers
com.adobe.ep.ux.content.view.components.version
com.adobe.ep.ux.documentsubmit.component
com.adobe.ep.ux.documentsubmit.domain
com.adobe.ep.ux.documentsubmit.skin
com.adobe.ep.ux.taskaction.component
com.adobe.ep.ux.taskaction.domain
com.adobe.ep.ux.taskaction.domain.events
com.adobe.ep.ux.taskaction.skin
com.adobe.ep.ux.taskdetails.component
com.adobe.ep.ux.taskdetails.domain
com.adobe.ep.ux.taskdetails.skin
com.adobe.ep.ux.tasklist.component
com.adobe.ep.ux.tasklist.domain
com.adobe.ep.ux.tasklist.skin
com.adobe.ep.ux.webdocumentviewer.domain
com.adobe.exm.expression
com.adobe.exm.expression.error
com.adobe.exm.expression.event
com.adobe.exm.expression.impl
com.adobe.fiber.runtime.lib
com.adobe.fiber.services
com.adobe.fiber.services.wrapper
com.adobe.fiber.styles
com.adobe.fiber.util
com.adobe.fiber.valueobjects
com.adobe.gravity.binding
com.adobe.gravity.context
com.adobe.gravity.flex.bundleloader
com.adobe.gravity.flex.progress
com.adobe.gravity.flex.serviceloader
com.adobe.gravity.framework
com.adobe.gravity.init
com.adobe.gravity.service.bundleloader
com.adobe.gravity.service.logging
com.adobe.gravity.service.manifest
com.adobe.gravity.service.progress
com.adobe.gravity.tracker
com.adobe.gravity.ui
com.adobe.gravity.utility
com.adobe.gravity.utility.async
com.adobe.gravity.utility.error
com.adobe.gravity.utility.events
com.adobe.gravity.utility.factory
com.adobe.gravity.utility.flex.async
com.adobe.gravity.utility.logging
com.adobe.gravity.utility.message
com.adobe.gravity.utility.sequence
com.adobe.gravity.utility.url
com.adobe.guides.control
com.adobe.guides.domain
com.adobe.guides.i18n
com.adobe.guides.spark.components.skins
com.adobe.guides.spark.components.skins.mx
com.adobe.guides.spark.headers.components
com.adobe.guides.spark.headers.skins
com.adobe.guides.spark.layouts.components
com.adobe.guides.spark.layouts.skins
com.adobe.guides.spark.navigators.components
com.adobe.guides.spark.navigators.renderers
com.adobe.guides.spark.navigators.skins
com.adobe.guides.spark.util
com.adobe.guides.spark.wrappers.components
com.adobe.guides.spark.wrappers.skins
com.adobe.guides.submit
com.adobe.icc.dc.domain
com.adobe.icc.dc.domain.factory
com.adobe.icc.editors.events
com.adobe.icc.editors.handlers
com.adobe.icc.editors.managers
com.adobe.icc.editors.model
com.adobe.icc.editors.model.config
com.adobe.icc.editors.model.el
com.adobe.icc.editors.model.el.operands
com.adobe.icc.editors.model.el.operators
com.adobe.icc.enum
com.adobe.icc.external.dc
com.adobe.icc.obj
com.adobe.icc.services
com.adobe.icc.services.category
com.adobe.icc.services.config
com.adobe.icc.services.download
com.adobe.icc.services.export
com.adobe.icc.services.external
com.adobe.icc.services.formbridge
com.adobe.icc.services.fragmentlayout
com.adobe.icc.services.layout
com.adobe.icc.services.letter
com.adobe.icc.services.locator
com.adobe.icc.services.module
com.adobe.icc.services.render
com.adobe.icc.services.submit
com.adobe.icc.services.user
com.adobe.icc.token
com.adobe.icc.vo
com.adobe.icc.vo.render
com.adobe.icomm.assetplacement.controller
com.adobe.icomm.assetplacement.controller.utils
com.adobe.icomm.assetplacement.data
com.adobe.icomm.assetplacement.model
com.adobe.livecycle.assetmanager.client
com.adobe.livecycle.assetmanager.client.event
com.adobe.livecycle.assetmanager.client.handler
com.adobe.livecycle.assetmanager.client.managers
com.adobe.livecycle.assetmanager.client.model
com.adobe.livecycle.assetmanager.client.model.cms
com.adobe.livecycle.assetmanager.client.service
com.adobe.livecycle.assetmanager.client.service.search
com.adobe.livecycle.assetmanager.client.service.search.cms
com.adobe.livecycle.assetmanager.client.utils
com.adobe.livecycle.content
com.adobe.livecycle.rca.model
com.adobe.livecycle.rca.model.constant
com.adobe.livecycle.rca.model.document
com.adobe.livecycle.rca.model.participant
com.adobe.livecycle.rca.model.reminder
com.adobe.livecycle.rca.model.stage
com.adobe.livecycle.rca.service
com.adobe.livecycle.rca.service.core
com.adobe.livecycle.rca.service.core.delegate
com.adobe.livecycle.rca.service.process
com.adobe.livecycle.rca.service.process.delegate
com.adobe.livecycle.rca.token
com.adobe.livecycle.ria.security.api
com.adobe.livecycle.ria.security.service
com.adobe.mosaic.layouts
com.adobe.mosaic.layouts.dragAndDrop
com.adobe.mosaic.layouts.interfaces
com.adobe.mosaic.mxml
com.adobe.mosaic.om.constants
com.adobe.mosaic.om.events
com.adobe.mosaic.om.impl
com.adobe.mosaic.om.interfaces
com.adobe.mosaic.skinning
com.adobe.mosaic.sparklib.editors
com.adobe.mosaic.sparklib.optionMenu
com.adobe.mosaic.sparklib.scrollableMenu
com.adobe.mosaic.sparklib.scrollableMenu.skins
com.adobe.mosaic.sparklib.tabLayout
com.adobe.mosaic.sparklib.tabLayout.events
com.adobe.mosaic.sparklib.tabLayout.layouts
com.adobe.mosaic.sparklib.tabLayout.skins
com.adobe.mosaic.sparklib.text
com.adobe.mosaic.sparklib.util
com.adobe.solutions.acm.authoring.presentation
com.adobe.solutions.acm.authoring.presentation.actionbar
com.adobe.solutions.acm.authoring.presentation.common
com.adobe.solutions.acm.authoring.presentation.events
com.adobe.solutions.acm.authoring.presentation.fragment
com.adobe.solutions.acm.authoring.presentation.letter
com.adobe.solutions.acm.authoring.presentation.letter.data
com.adobe.solutions.acm.authoring.presentation.preview
com.adobe.solutions.acm.authoring.presentation.rte
com.adobe.solutions.acm.ccr.presentation
com.adobe.solutions.acm.ccr.presentation.contentcapture
com.adobe.solutions.acm.ccr.presentation.contentcapture.events
com.adobe.solutions.acm.ccr.presentation.contentcapture.preview
com.adobe.solutions.acm.ccr.presentation.datacapture
com.adobe.solutions.acm.ccr.presentation.datacapture.renderers
com.adobe.solutions.acm.ccr.presentation.pdf
com.adobe.solutions.exm
com.adobe.solutions.exm.authoring
com.adobe.solutions.exm.authoring.components.controls
com.adobe.solutions.exm.authoring.components.toolbars
com.adobe.solutions.exm.authoring.domain
com.adobe.solutions.exm.authoring.domain.expression
com.adobe.solutions.exm.authoring.domain.impl
com.adobe.solutions.exm.authoring.domain.method
com.adobe.solutions.exm.authoring.domain.variable
com.adobe.solutions.exm.authoring.enum
com.adobe.solutions.exm.authoring.events
com.adobe.solutions.exm.authoring.model
com.adobe.solutions.exm.authoring.renderer
com.adobe.solutions.exm.authoring.view
com.adobe.solutions.exm.expression
com.adobe.solutions.exm.impl
com.adobe.solutions.exm.impl.method
com.adobe.solutions.exm.method
com.adobe.solutions.exm.mock
com.adobe.solutions.exm.mock.method
com.adobe.solutions.exm.runtime
com.adobe.solutions.exm.runtime.impl
com.adobe.solutions.exm.variable
com.adobe.solutions.prm.constant
com.adobe.solutions.prm.domain
com.adobe.solutions.prm.domain.factory
com.adobe.solutions.prm.domain.impl
com.adobe.solutions.prm.domain.manager
com.adobe.solutions.prm.presentation.asset
com.adobe.solutions.prm.presentation.constant
com.adobe.solutions.prm.presentation.document
com.adobe.solutions.prm.presentation.event
com.adobe.solutions.prm.presentation.file
com.adobe.solutions.prm.presentation.project
com.adobe.solutions.prm.presentation.team
com.adobe.solutions.prm.presentation.util
com.adobe.solutions.prm.service
com.adobe.solutions.prm.services.impl
com.adobe.solutions.prm.vo
com.adobe.solutions.rca.constant
com.adobe.solutions.rca.domain
com.adobe.solutions.rca.domain.common
com.adobe.solutions.rca.domain.factory
com.adobe.solutions.rca.domain.impl
com.adobe.solutions.rca.domain.impl.manager
com.adobe.solutions.rca.domain.manager
com.adobe.solutions.rca.presentation
com.adobe.solutions.rca.presentation.comment
com.adobe.solutions.rca.presentation.constant
com.adobe.solutions.rca.presentation.event
com.adobe.solutions.rca.presentation.gantt
com.adobe.solutions.rca.presentation.gantt.ruler
com.adobe.solutions.rca.presentation.template
com.adobe.solutions.rca.presentation.template.audit
com.adobe.solutions.rca.presentation.template.definition
com.adobe.solutions.rca.presentation.template.documents
com.adobe.solutions.rca.presentation.template.stages
com.adobe.solutions.rca.presentation.util
com.adobe.solutions.rca.service
com.adobe.solutions.rca.services.impl
com.adobe.solutions.rca.vo
com.adobe.solutions.rca.vo.um
com.adobe.viewsource
fl.accessibility
fl.containers
fl.controls
fl.controls.dataGridClasses
fl.controls.listClasses
fl.controls.progressBarClasses
fl.core
fl.data
fl.display
fl.events
fl.ik
fl.lang
fl.livepreview
fl.managers
fl.motion
fl.motion.easing
fl.rsl
fl.text
fl.transitions
fl.transitions.easing
fl.video
flash.accessibility
flash.concurrent
flash.crypto
flash.data
flash.desktop
flash.display
flash.display3D
flash.display3D.textures
flash.errors
flash.events
flash.external
flash.filesystem
flash.filters
flash.geom
flash.globalization
flash.html
flash.media
flash.net
flash.net.dns
flash.net.drm
flash.notifications
flash.permissions
flash.printing
flash.profiler
flash.sampler
flash.security
flash.sensors
flash.system
flash.text
flash.text.engine
flash.text.ime
flash.ui
flash.utils
flash.xml
flashx.textLayout
flashx.textLayout.compose
flashx.textLayout.container
flashx.textLayout.conversion
flashx.textLayout.edit
flashx.textLayout.elements
flashx.textLayout.events
flashx.textLayout.factory
flashx.textLayout.formats
flashx.textLayout.operations
flashx.textLayout.utils
flashx.undo
ga.controls
ga.layouts
ga.model
ga.uiComponents
ga.util
ga.views
ga.wrappers
lc.foundation
lc.foundation.domain
lc.foundation.events
lc.foundation.ui
lc.foundation.util
lc.preloader
lc.procmgmt
lc.procmgmt.commands
lc.procmgmt.domain
lc.procmgmt.events
lc.procmgmt.formbridge
lc.procmgmt.impl
lc.procmgmt.ui.attachments
lc.procmgmt.ui.controls
lc.procmgmt.ui.controls.card
lc.procmgmt.ui.controls.renderer
lc.procmgmt.ui.help
lc.procmgmt.ui.layout
lc.procmgmt.ui.presentationmodel
lc.procmgmt.ui.process
lc.procmgmt.ui.search
lc.procmgmt.ui.startpoint
lc.procmgmt.ui.task
lc.procmgmt.ui.task.form
lc.procmgmt.ui.task.form.commands
lc.procmgmt.ui.tracking
mx.accessibility
mx.automation
mx.automation.air
mx.automation.delegates
mx.automation.delegates.advancedDataGrid
mx.automation.delegates.charts
mx.automation.delegates.containers
mx.automation.delegates.controls
mx.automation.delegates.controls.dataGridClasses
mx.automation.delegates.controls.fileSystemClasses
mx.automation.delegates.core
mx.automation.delegates.flashflexkit
mx.automation.events
mx.binding
mx.binding.utils
mx.charts
mx.charts.chartClasses
mx.charts.effects
mx.charts.effects.effectClasses
mx.charts.events
mx.charts.renderers
mx.charts.series
mx.charts.series.items
mx.charts.series.renderData
mx.charts.styles
mx.collections
mx.collections.errors
mx.containers
mx.containers.accordionClasses
mx.containers.dividedBoxClasses
mx.containers.errors
mx.containers.utilityClasses
mx.controls
mx.controls.advancedDataGridClasses
mx.controls.dataGridClasses
mx.controls.listClasses
mx.controls.menuClasses
mx.controls.olapDataGridClasses
mx.controls.scrollClasses
mx.controls.sliderClasses
mx.controls.textClasses
mx.controls.treeClasses
mx.controls.videoClasses
mx.core
mx.core.windowClasses
mx.data
mx.data.crypto
mx.data.errors
mx.data.events
mx.data.messages
mx.data.mxml
mx.data.offline.errors
mx.data.utils
mx.effects
mx.effects.easing
mx.effects.effectClasses
mx.events
mx.filters
mx.flash
mx.formatters
mx.geom
mx.graphics
mx.graphics.codec
mx.graphics.shaderClasses
mx.logging
mx.logging.errors
mx.logging.targets
mx.managers
mx.messaging
mx.messaging.channels
mx.messaging.config
mx.messaging.errors
mx.messaging.events
mx.messaging.management
mx.messaging.messages
mx.modules
mx.netmon
mx.olap
mx.olap.aggregators
mx.preloaders
mx.printing
mx.resources
mx.rpc
mx.rpc.events
mx.rpc.http
mx.rpc.http.mxml
mx.rpc.livecycle
mx.rpc.mxml
mx.rpc.remoting
mx.rpc.remoting.mxml
mx.rpc.soap
mx.rpc.soap.mxml
mx.rpc.wsdl
mx.rpc.xml
mx.skins
mx.skins.halo
mx.skins.spark
mx.skins.wireframe
mx.skins.wireframe.windowChrome
mx.states
mx.styles
mx.utils
mx.validators
org.osmf.containers
org.osmf.display
org.osmf.elements
org.osmf.events
org.osmf.layout
org.osmf.logging
org.osmf.media
org.osmf.metadata
org.osmf.net
org.osmf.net.dvr
org.osmf.net.httpstreaming
org.osmf.net.metrics
org.osmf.net.qos
org.osmf.net.rtmpstreaming
org.osmf.net.rules
org.osmf.traits
org.osmf.utils
spark.accessibility
spark.automation.delegates
spark.automation.delegates.components
spark.automation.delegates.components.gridClasses
spark.automation.delegates.components.mediaClasses
spark.automation.delegates.components.supportClasses
spark.automation.delegates.skins.spark
spark.automation.events
spark.collections
spark.components
spark.components.calendarClasses
spark.components.gridClasses
spark.components.mediaClasses
spark.components.supportClasses
spark.components.windowClasses
spark.core
spark.effects
spark.effects.animation
spark.effects.easing
spark.effects.interpolation
spark.effects.supportClasses
spark.events
spark.filters
spark.formatters
spark.formatters.supportClasses
spark.globalization
spark.globalization.supportClasses
spark.layouts
spark.layouts.supportClasses
spark.managers
spark.modules
spark.preloaders
spark.primitives
spark.primitives.supportClasses
spark.skins
spark.skins.mobile
spark.skins.mobile.supportClasses
spark.skins.spark
spark.skins.spark.mediaClasses.fullScreen
spark.skins.spark.mediaClasses.normal
spark.skins.spark.windowChrome
spark.skins.wireframe
spark.skins.wireframe.mediaClasses
spark.skins.wireframe.mediaClasses.fullScreen
spark.transitions
spark.utils
spark.validators
spark.validators.supportClasses
xd.core.axm.enterprise.view.components
xd.core.axm.enterprise.view.skins
xd.core.axm.view.components
xd.core.axm.view.components.support

语言元素

全局常量
全局函数
运算符
语句、关键字和指令
特殊类型

附录

新增内容
编译器错误
编译器警告
运行时错误
迁移到 ActionScript 3
支持的字符集
仅适用于 MXML 的标签
Motion XML 元素
Timed Text 标记
不推荐使用的元素的列表
AccessibilityImplementation 常量
如何使用 ActionScript 示例
法律声明
mx.charts
public class DateTimeAxis
继承DateTimeAxis Inheritance NumericAxis Inheritance AxisBase Inheritance EventDispatcher Inheritance Object

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

DateTimeAxis 类沿图表轴在最大值和最小值之间均匀地映射时间值。当您提供自定义分析功能时,它可以绘制采用以下形式表示的值:Date 类的实例、表示自时间原点(1970 年 1 月 1 日子时,格林威治标准时间)至今的毫秒数,或 String 值。

DateTimeAxis 可检查轴的最小值和最大值之间的范围,以此选择最合理的单位用于标记轴。该轴将选择最大单位,用来为给定范围生成合理数目的标签。可通过设置 labelUnits 属性来限定图表所需的单位集合,或明确指定应使用的单位。

可显式指定最小值和最大值,或者通过检查将要在图表中呈示的值让该轴自动确定这两个值。默认情况下,DateTimeAxis 将选择可能的最小范围,以包含图表中表示的所有值。另外,还可以通过将 autoAdjust 属性设置为 true 来请求将最小值和最大值舍入到所有单位(毫秒、秒钟、分钟、小时、天、星期、月、年)。

您可以指定每周中禁用的天数以及禁用的日期范围,以仅在轴上显示工作日,而不是显示最小值与最大值之间的每一天。它还会筛选数据,仅显示与图表中工作日对应的数据

MXML 语法expanded隐藏 MXML 语法

The <mx:DateTimeAxis> tag inherits all the properties of its parent classes and adds the following properties:

  <mx:DateTimeAxis
    Properties
    alignLabelsToUnits="true|false"
    dataUnits="milliseconds|seconds|minutes|hours|days|weeks|months|years"
    disabledDays="Array; No default"
    disabledRanges="Array; No default"
    displayLocalTime="false"
    interval="Number"
    labelUnits="milliseconds|seconds|minutes|hours|days|weeks|months|years"
    maximum="Date"
    minimum="Date"
    minorTickInterval="Number"
    minorTickUnits="milliseconds|seconds|minutes|hours|days|weeks|months|years"
  />
  

查看示例

相关 API 元素



公共属性
 属性由以下参数定义
  alignLabelsToUnits : Boolean
确定标签在轴上的位置。
DateTimeAxis
 InheritedautoAdjust : Boolean
指定 Flex 是否舍入值。
NumericAxis
 InheritedbaseAtZero : Boolean
指定 Flex 是否尝试保持最小值和最大值基于零。
NumericAxis
 Inheritedbaseline : Number
[只读] 只要此值大于 0,则为此轴的最小计算值。
NumericAxis
 InheritedchartDataProvider : Object
[只写] 分配给封闭图表的数据提供程序。
AxisBase
 InheritedcomputedMaximum : Number
此轴表示的最大计算值。
NumericAxis
 InheritedcomputedMinimum : Number
此轴表示的最小计算值。
NumericAxis
 Inheritedconstructor : Object
对类对象或给定对象实例的构造函数的引用。
Object
  dataInterval : Number
[只写] 指定图表中数据间的间隔(在 dataUnits 中指定)。
DateTimeAxis
  dataUnits : String
指定您期望用于表示图表中数据的单位。
DateTimeAxis
 Inheriteddirection : String
确定呈示轴的方向。
NumericAxis
  disabledDays : Array
每周中要禁用的日期。
DateTimeAxis
  disabledRanges : Array
禁用一天或多天。
DateTimeAxis
  displayLocalTime : Boolean
如果设置为 true,则 DateTimeAxis 会将所有日期值视为运行该应用程序的客户端计算机所在的时区中的时间。
DateTimeAxis
 InheriteddisplayName : String
轴的名称。
AxisBase
  interval : Number
指定轴上标签值之间的 labelUnits 数目。
DateTimeAxis
 InheritedlabelFunction : Function
调用以设置轴值的格式,使其显示为标签。
NumericAxis
  labelUnits : String
轴生成标签所使用的单位。
DateTimeAxis
  maximum : Date
指定轴标签的最大值。
DateTimeAxis
  minimum : Date
指定轴标签的最小值。
DateTimeAxis
  minorTickInterval : Number
指定轴上次刻度线间的 minorTickUnits 数目。
DateTimeAxis
 InheritedminorTicks : Array
[只读] 用于表示此轴的生成的次要刻度线 Array。
NumericAxis
  minorTickUnits : String
轴在生成次刻度线时考虑使用的单位。
DateTimeAxis
 Inheritedpadding : Number
在屏幕上显示值时,指定 Flex 添加到轴的最小计算值和最大计算值的填充。
NumericAxis
  parseFunction : Function
[覆盖] 指定自定义数据点的值的方法。
DateTimeAxis
 Inheritedtitle : String
沿该轴显示的标题文本。
AxisBase
  unitSize : Number
[覆盖] [只读] 单个数据单位的宽度,以像素为单位。
DateTimeAxis
受保护的属性
 属性由以下参数定义
 InheritedassignedMaximum : Number
显式指定的最大值。
NumericAxis
 InheritedassignedMinimum : Number
显式指定的最小值。
NumericAxis
 InheritedcomputedInterval : Number
此轴表示的计算间隔。
NumericAxis
 InheriteddataDescriptions : Array
[只读] 描述图表要显示的数据的 DataDescription 结构 Array。
NumericAxis
 InheritedlabelCache : Array
用于表示此轴的最新生成的 AxisLabel 对象组。
NumericAxis
 InheritedlabelMaximum : Number
标签所放位置的最大值。
NumericAxis
 InheritedlabelMinimum : Number
标签所放位置的最小值。
NumericAxis
 InheritedminorTickCache : Array
用于表示此轴的最新生成的刻度线组。
NumericAxis
  requiredDescribedFields : uint
[覆盖] [只读] 此轴涉及的 DescribeData 结构字段。
DateTimeAxis
 Inheritedticks : Array
[只读] 此轴的刻度线 Array。
NumericAxis
公共方法
 方法由以下参数定义
  
构造函数。
DateTimeAxis
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
使用 EventDispatcher 对象注册事件侦听器对象,以使侦听器能够接收事件通知。
EventDispatcher
 Inherited
在图表数据更改时触发通知范围对象的事件。
AxisBase
 Inherited
将事件调度到事件流中。
EventDispatcher
  
filterCache(cache:Array, field:String, filteredField:String):void
[覆盖] 将任意类型的一组值过滤为可以映射的一组数字。
DateTimeAxis
 Inherited
格式化值以便在 DataTip 中显示。
NumericAxis
 Inherited
确定范围以估计轴标签的内容。
NumericAxis
 Inherited
getLabels(minimumAxisLength:Number):AxisLabelSet
获取显示的标签文本。
NumericAxis
 Inherited
检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。
EventDispatcher
 Inherited
表示对象是否已经定义了指定的属性。
Object
 Inherited
沿轴将一个位置映射回数字数据值。
NumericAxis
 Inherited
表示 Object 类的实例是否在指定为参数的对象的原型链中。
Object
 Inherited
mapCache(cache:Array, field:String, convertedField:String, indexValues:Boolean = false):void
将任意类型的一组值转换为一组可以转换为屏幕坐标的数字。
NumericAxis
 Inherited
确定轴处理重叠标签的方式。
NumericAxis
 Inherited
表示指定的属性是否存在、是否可枚举。
Object
  
reduceLabels(intervalStart:AxisLabel, intervalEnd:AxisLabel):AxisLabelSet
[覆盖] 当在不发生重叠的情况下 AxisRenderer 无法清楚地显示标签时调用,像 Axis 对象减少标签组中标签的数目一样。
DateTimeAxis
 Inherited
使用轴的每个 DataTransform 都将自身注册到该轴。
AxisBase
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
从 EventDispatcher 对象中删除侦听器。
EventDispatcher
 Inherited
设置循环操作动态属性的可用性。
Object
 Inherited
返回此对象的字符串表示形式,其格式设置遵守区域设置特定的约定。
Object
 Inherited
返回指定对象的字符串表示形式。
Object
  
transformCache(cache:Array, field:String, convertedField:String):void
[覆盖] 将一组来自数据空间的值映射到屏幕空间。
DateTimeAxis
 Inherited
使用轴的每个 DataTransform 都将自身注册到该轴。
AxisBase
 Inherited
更新图表。
NumericAxis
 Inherited
返回指定对象的原始值。
Object
 Inherited
检查是否用此 EventDispatcher 对象或其任何祖代为指定事件类型注册了事件侦听器。
EventDispatcher
受保护的方法
 方法由以下参数定义
 Inherited
adjustMinMax(minValue:Number, maxValue:Number):void
调整轴标签的生成范围或分配范围。
NumericAxis
 Inherited
使用表示轴当前值的标签填充 labelCache 属性。
NumericAxis
  
[覆盖] 为此轴生成的次要刻度线数组构建位置 Array。
DateTimeAxis
 Inherited
describeData(requiredFields:uint):Array
由具有控制地位的 DataTransform 调用,以获得由此 IChartElement 表示的数据描述。
AxisBase
  
当轴采用以天为单位的 labelUnits 呈示时,所使用的默认格式设置函数。
DateTimeAxis
  
当轴采用以毫秒为单位的 labelUnits 呈示时,所使用的默认格式设置函数。
DateTimeAxis
  
当轴采用以分钟为单位的 labelUnits 呈示时,所使用的默认格式设置函数。
DateTimeAxis
  
当轴采用以月为单位的 labelUnits 呈示时,所使用的默认格式设置函数。
DateTimeAxis
  
当轴采用以秒为单位的 labelUnits 呈示时,所使用的默认格式设置函数。
DateTimeAxis
  
当轴采用以年为单位的 labelUnit 呈示时,所使用的默认格式设置函数。
DateTimeAxis
 Inherited
保护此范围,以防使用对此轴类型无效的值。
NumericAxis
 Inherited
使表示此轴值的缓存标签和刻度线失效。
NumericAxis
事件
 事件 摘要 由以下参数定义
 Inherited[广播事件] Flash Player 或 AIR 应用程序获得操作系统焦点并变为活动状态时将调度此事件。EventDispatcher
 Inherited[广播事件] Flash Player 或 AIR 应用程序失去操作系统焦点并变为非活动状态时将调度此事件。EventDispatcher
属性详细信息

alignLabelsToUnits

属性
alignLabelsToUnits:Boolean

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

确定标签在轴上的位置。

如果设置为 false,图表会始终将标签放置在轴的前端。例如,如果您每月放置一次标签,并且第一个数据点为 7 月 14 日,则您的第一个标签将出现在 7 月 14 日。如果设置为 true,Flex 会首先计算标签单位,然后在这些单位的第一个完整间隔处设置标签。例如,如果您的第一个数据点为 7 月 14 日,并且您的标签单位为月(显式设置或动态计算),则第一个标签将出现在 8 月 1 日。

默认值为 true。



实现
    public function get alignLabelsToUnits():Boolean
    public function set alignLabelsToUnits(value:Boolean):void

dataInterval

属性 
dataInterval:Number  [只写]

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

指定图表中数据间的间隔(在 dataUnits 中指定)。

例如,如果将 dataUnits 属性设置为 "hours",并将 dataInterval 属性设置为 4,则图表将假定您的数据每隔三小时发生一次。这将影响到一些系列(例如 ColumnSeries 和 CandlestickSeries)呈示其数据的方式,还会影响标签的自动选择方式。



实现
    public function set dataInterval(value:Number):void

相关 API 元素

dataUnits

属性 
dataUnits:String

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

指定您期望用于表示图表中数据的单位。该值可以是下列值之一:

  • milliseconds
  • seconds
  • minutes
  • hours
  • days
  • weeks
  • months
  • years

此值有两种用途。第一种,当选择合适的标签单位时,DateTimeAxis 选择的单位不会比使用该数据表示的单位小。如果 dataUnits 属性的值为 days,则无论最小值或最大值的范围是多少,每到第四个小时处图表都不会呈示标签。

第二种,部分系列使用 dataUnits 属性的值来影响其呈示。特别是,大多数柱形系列(例如,ColumnSeries、BarSeries、CandlestickSeries 和 HLOCSeries)都使用 dataUnits 属性的值来确定列的呈示宽度。

例如,如果将 ColumnChart 控件水平轴的 labelUnits 属性设置为 weeks,并将其 dataUnits 属性设置为 days,则 ColumnChart 将使用标签间距离的 1/7 作为宽度来呈示每列。

dataUnits 属性设置为 null 时,柱形系列将按天呈示列,但 DateTimeAxis 在生成标签时,会选择适当的单位。

默认值为 null。



实现
    public function get dataUnits():String
    public function set dataUnits(value:String):void

disabledDays

属性 
disabledDays:Array

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

每周中要禁用的日期。每月中除指定日期外,所有日期都被禁用。此数组中的元素可使用介于 0(星期日)到 6(星期六)之间的值。例如,如果设置值 [ 0, 6 ],将禁用星期日和星期六。



实现
    public function get disabledDays():Array
    public function set disabledDays(value:Array):void

disabledRanges

属性 
disabledRanges:Array

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

禁用一天或多天。

此属性接受对象 Array 作为参数。此数组中的所有对象都是 Date 对象,用于指定要禁用的各个日期;也可以是一个包含 rangeStart 和(或)rangeEnd 属性的对象。这些属性的值描述了日期范围的边界。如果忽略其中任一属性,则认为在该方向上无范围限制。如果仅指定 rangeStart,则将禁用指定日期之后的所有日期(包括 rangeStart 日期)。如果仅指定 rangeEnd,则将禁用指定日期之前的所有日期(包括 rangeEnd 日期)。要禁用单个日期,请使用一个 Date 对象指定 Array 中的某个日期。

以下示例将禁用下列日期:2006 年 1 月 11 日,从 2006 年 1 月 23 至同年 2 月 10 日,以及 2006 年 3 月 1 日及后续所有日期。

disabledRanges="{[ new Date(2006,0,11), {rangeStart: new Date(2006,0,23), rangeEnd: new Date(2006,1,10)}, {rangeStart: new Date(2006,2,1)} ]}"

默认值为 []。



实现
    public function get disabledRanges():Array
    public function set disabledRanges(value:Array):void

displayLocalTime

属性 
displayLocalTime:Boolean

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

如果设置为 true,则 DateTimeAxis 会将所有日期值视为运行该应用程序的客户端计算机所在的时区中的时间。如果设置为 false,则所有值都为通用时间(格林威治标准时间)。



实现
    public function get displayLocalTime():Boolean
    public function set displayLocalTime(value:Boolean):void

interval

属性 
interval:Number

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

指定轴上标签值之间的 labelUnits 数目。如果将此属性设置为 null,则 Flex 将计算此间隔。

默认值为 null。



实现
    public function get interval():Number
    public function set interval(value:Number):void

labelUnits

属性 
labelUnits:String

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

轴生成标签所使用的单位。默认情况下,DateTimeAxis 会考虑所有有效单位(millisecondssecondsminuteshoursdaysweeksmonthsyears)。

如果未设置 labelUnits 属性,则图表呈示标签所用的单位不能小于 dataUnits 属性的值。



实现
    public function get labelUnits():String
    public function set labelUnits(value:String):void

maximum

属性 
maximum:Date

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

指定轴标签的最大值。如果设置为 null,Flex 将指定图表中数据的最小值。

默认值为 null。



实现
    public function get maximum():Date
    public function set maximum(value:Date):void

minimum

属性 
minimum:Date

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

指定轴标签的最小值。如果设置为 null,Flex 将指定图表中数据的最小值。

默认值为 null。



实现
    public function get minimum():Date
    public function set minimum(value:Date):void

minorTickInterval

属性 
minorTickInterval:Number

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

指定轴上次刻度线间的 minorTickUnits 数目。如果将其设置为 NaN,则 DateTimeAxis 会自动计算此值。

通常会将 minorTickInterval 属性自动设置为 1。但是,如果 minorTickUnits 属性的单位与 dataUnits 属性相同(显式设置或隐式计算),则 minorTickInterval 属性为最大值 1 或 dataInterval



实现
    public function get minorTickInterval():Number
    public function set minorTickInterval(value:Number):void

minorTickUnits

属性 
minorTickUnits:String

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

轴在生成次刻度线时考虑使用的单位。默认情况下,DateTimeAxis 会考虑所有有效单位(millisecondssecondsminuteshoursdaysweeksmonthsyears)。

如果未设置此属性,则图表将确定 minorTickUnits 属性的值。如果标签间隔大于 1,则会将 minorTickUnits 属性设置为 labelUnits 属性的值,并将 minorTickInterval 属性设置为 1。如果标签间隔等于 1,则会将 minorTickUnits 属性设置为 labelUnits 属性的下一级单位。如此设置之后,minorTickUnits 属性将永远不会小于 dataUnits 属性的值。



实现
    public function get minorTickUnits():String
    public function set minorTickUnits(value:String):void

parseFunction

属性 
parseFunction:Function[覆盖]

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

指定自定义数据点的值的方法。借助此属性,您可以指定接受值并返回 Date 对象的方法。然后,Date 对象将用于图表的 DateTimeAxis 对象中。这使您能够提供可自定义的日期输入字符串,并将其转换为 Date 对象,Flex 接下来会解释该对象以将其用于 DateTimeAxis。

Flex 只向分析方法传递一个参数。此参数是您为系列指定的数据点的值。通常,它是表示某种日期形式的 String。您无法覆盖此参数,也无法添加其他参数。

此 Date 对象会立即转换成数值,因此为优化性能,自定义 parseFunctions 可以重复使用同一 Date 对象。默认情况下,DateTimeAxis 使用 ECMA 标准 Date.parse() 方法中的字符串分析功能。

以下示例使用采用 { yyyy, mm, dd } 格式定义数据对象的数据提供程序。由 parseFunction 指定的方法将使用这些值来创建可供轴使用的 Date 对象。
      <mx:Script>
          import mx.collections.ArrayCollection;
          [Bindable] 
          public var aapl:ArrayCollection = new ArrayCollection([ 
              {date: "2005, 8, 1", close: 42.71},
              {date: "2005, 8, 2", close: 42.99},
              {date: "2005, 8, 3", close: 44}
          ]);
          
          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. Note that the month argument is 0-based (with 0 being January).
              var newDate:Date = new Date(a[0],a[1]-1,a[2]);
              return newDate;
          }
      </mx:Script>
      <mx:LineChart id="mychart" dataProvider="{aapl}" showDataTips="true">
          <mx:horizontalAxis>
              <mx:DateTimeAxis dataUnits="days" parseFunction="myParseFunction"/>
          </mx:horizontalAxis>
          <mx:series>
              <mx:LineSeries yField="close" xField="date" displayName="AAPL"/>
          </mx:series>
      </mx:LineChart>
      



实现
    override public function get parseFunction():Function
    override public function set parseFunction(value:Function):void

requiredDescribedFields

属性 
requiredDescribedFields:uint  [只读] [覆盖]

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

此轴涉及的 DescribeData 结构字段。



实现
    override protected function get requiredDescribedFields():uint

unitSize

属性 
unitSize:Number  [只读] [覆盖]

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

单个数据单位的宽度,以像素为单位。数据单位的类型由 dataUnits 属性的值确定。



实现
    override public function get unitSize():Number
构造函数详细信息

DateTimeAxis

()构造函数
public function DateTimeAxis()

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

构造函数。

方法详细信息

buildMinorTickCache

()方法
override protected function buildMinorTickCache():Array

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

为此轴生成的次要刻度线数组构建位置 Array。子类必须实现此函数。NumericAxis 自动调用此函数。应该访问 minorTicks 属性,而不是直接调用此函数。

返回
Array — 0 和 1 之间的位置 Array 表示在轴最小值和最大值之间呈示次要刻度线的点。

filterCache

()方法 
override public function filterCache(cache:Array, field:String, filteredField:String):void

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

将任意类型的一组值过滤为可以映射的一组数字。

参数

cache:Array — 可从中读取和存储转换后的值的对象数组。
 
field:String — 包含过滤之前的值的缓存 Array 中所含的对象域。
 
filteredField:String — 存储过滤后的值的缓存 Array 中所含的对象域。

formatDays

()方法 
protected function formatDays(d:Date, previousValue:Date, axis:mx.charts:DateTimeAxis):String

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

当轴采用以天为单位的 labelUnits 呈示时,所使用的默认格式设置函数。如果编写了自定义的 DateTimeAxis 类,则可以覆盖此方法,以提供备用的默认格式。

您无需直接调用此方法。Flex 会在呈示标签前调用此方法,以显示适当的 String。

参数

d:Date — 包含要设置格式的单位的 Date 对象。
 
previousValue:Date — 包含先于当前数据点发生的数据点的 Date 对象。
 
axis:mx.charts:DateTimeAxis — 用于呈示标签的 DateTimeAxis。

返回
String — 已设置格式的标签。

formatMilliseconds

()方法 
protected function formatMilliseconds(d:Date, previousValue:Date, axis:mx.charts:DateTimeAxis):String

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

当轴采用以毫秒为单位的 labelUnits 呈示时,所使用的默认格式设置函数。如果编写了自定义的 DateTimeAxis 类,则可以覆盖此方法,以提供备用的默认格式。

您无需直接调用此方法。Flex 会在呈示标签前调用此方法,以显示适当的 String。

参数

d:Date — 包含要设置格式的单位的 Date 对象。
 
previousValue:Date — 包含先于当前数据点发生的数据点的 Date 对象。
 
axis:mx.charts:DateTimeAxis — 用于呈示标签的 DateTimeAxis。

返回
String — 已设置格式的标签。

formatMinutes

()方法 
protected function formatMinutes(d:Date, previousValue:Date, axis:mx.charts:DateTimeAxis):String

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

当轴采用以分钟为单位的 labelUnits 呈示时,所使用的默认格式设置函数。如果编写了自定义的 DateTimeAxis 类,则可以覆盖此方法,以提供备用的默认格式。

您无需直接调用此方法。Flex 会在呈示标签前调用此方法,以显示适当的 String。

参数

d:Date — 包含要设置格式的单位的 Date 对象。
 
previousValue:Date — 包含先于当前数据点发生的数据点的 Date 对象。
 
axis:mx.charts:DateTimeAxis — 用于呈示标签的 DateTimeAxis。

返回
String — 已设置格式的标签。

formatMonths

()方法 
protected function formatMonths(d:Date, previousValue:Date, axis:mx.charts:DateTimeAxis):String

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

当轴采用以月为单位的 labelUnits 呈示时,所使用的默认格式设置函数。如果编写了自定义的 DateTimeAxis 类,则可以覆盖此方法,以提供备用的默认格式。

您无需直接调用此方法。Flex 会在呈示标签前调用此方法,以显示适当的 String。

参数

d:Date — 包含要设置格式的单位的 Date 对象。
 
previousValue:Date — 包含先于当前数据点发生的数据点的 Date 对象。
 
axis:mx.charts:DateTimeAxis — 用于呈示标签的 DateTimeAxis。

返回
String — 已设置格式的标签。

formatSeconds

()方法 
protected function formatSeconds(d:Date, previousValue:Date, axis:mx.charts:DateTimeAxis):String

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

当轴采用以秒为单位的 labelUnits 呈示时,所使用的默认格式设置函数。如果编写了自定义的 DateTimeAxis 类,则可以覆盖此方法,以提供备用的默认格式。

您无需直接调用此方法。Flex 会在呈示标签前调用此方法,以显示适当的 String。

参数

d:Date — 包含要设置格式的单位的 Date 对象。
 
previousValue:Date — 包含先于当前数据点发生的数据点的 Date 对象。
 
axis:mx.charts:DateTimeAxis — 用于呈示标签的 DateTimeAxis。

返回
String — 已设置格式的标签。

formatYears

()方法 
protected function formatYears(d:Date, previousValue:Date, axis:mx.charts:DateTimeAxis):String

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

当轴采用以年为单位的 labelUnits 呈示时,所使用的默认格式设置函数。如果编写了自定义的 DateTimeAxis 类,则可以覆盖此方法,以提供备用的默认格式。

您无需直接调用此方法。Flex 会在呈示标签前调用此方法,以显示适当的 String。

参数

d:Date — 包含要设置格式的单位的 Date 对象。
 
previousValue:Date — 包含先于当前数据点发生的数据点的 Date 对象。
 
axis:mx.charts:DateTimeAxis — 用于呈示标签的 DateTimeAxis。

返回
String — 已设置格式的标签。

reduceLabels

()方法 
override public function reduceLabels(intervalStart:AxisLabel, intervalEnd:AxisLabel):AxisLabelSet

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

当在不发生重叠的情况下 AxisRenderer 无法清楚地显示标签时调用,像 Axis 对象减少标签组中标签的数目一样。此方法传递重叠的两个标签。

参数

intervalStart:AxisLabel — 标签重叠处间隔的开始位置。
 
intervalEnd:AxisLabel — 标签重叠处间隔的结束位置。

返回
AxisLabelSet — 通过减少标签的数目来解决重叠问题的新标签组。

transformCache

()方法 
override public function transformCache(cache:Array, field:String, convertedField:String):void

语言版本: ActionScript 3.0
产品版本: Flex 3
运行时版本: Flash Player 9, AIR 1.1

将一组来自数据空间的值映射到屏幕空间。

参数

cache:Array — 可从中读取和存储映射后的值的对象 Array。
 
field:String — 包含映射之前的值的缓存 Array 中所含的对象域。
 
convertedField:String — 存储映射后的值的缓存 Array 中所含的对象域。

DateTimeAxisExample.mxml
<?xml version="1.0"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark" 
    xmlns:mx="library://ns.adobe.com/flex/mx">

    <fx:Script>
        <![CDATA[

            import mx.collections.ArrayCollection;

            [Bindable] 
            public var stockDataAC:ArrayCollection = new ArrayCollection( [
                {date: "2005, 7, 27", close: 41.71},
                {date: "2005, 7, 28", close: 42.21},
                {date: "2005, 7, 29", close: 42.11},
                {date: "2005, 8, 1", close: 42.71},
                {date: "2005, 8, 2", close: 42.99},
                {date: "2005, 8, 3", close: 44} ]);
    
            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;
            }
        ]]>
    </fx: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"/>
            </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>
</s:Application>




[ X ]为什么显示为英语?
《ActionScript 3.0 参考》中的内容以英语显示

《ActionScript 3.0 参考》中的部分内容未翻译成所有语言。当某个语言元素未翻译时,将显示为英语。例如,ga.controls.HelpBox 类未翻译成任何语言。因此在简体中文版的参考中,ga.controls.HelpBox 类显示为英语。