패키지 | mx.charts.chartClasses |
클래스 | public class DataTransform |
상속 | DataTransform EventDispatcher Object |
하위 클래스 | CartesianTransform, PolarTransform |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
In theory, a chart can contain multiple overlaid DataTransform objects. This allows you to display a chart with multiple data sets rendered in the same area but with different ranges. For example, you might want to show monthly revenues compared to the number of units sold. If revenue was typically in millions while units was typically in the thousands, it would be difficult to render these effectively along the same range. Overlaying them in different DataTransform objects allows the end user to compare trends in the values when they are rendered with different ranges.
Charts can only contain one set of DataTransform.
Most of the time, you will use the ChartBase object, which hides the existance of the DataTransform object between the chart and its contained glyphs and axis objects. If you create your own ChartElement objects, you must understand the methods of the DataTransform class to correctly implement their element.
속성 | 정의 주체 | ||
---|---|---|---|
axes : Object [읽기 전용]
The set of axes associated with this transform. | DataTransform | ||
constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | ||
elements : Array
The elements that are associated with this transform. | DataTransform |
메서드 | 정의 주체 | ||
---|---|---|---|
Constructor. | DataTransform | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
리스너에서 이벤트 알림을 받을 수 있도록 EventDispatcher 객체에 이벤트 리스너 객체를 등록합니다. | EventDispatcher | ||
Informs the DataTransform that some of the underlying data
being represented on the chart has changed. | DataTransform | ||
Collects important displayed values for all elements
associated with this data transform. | DataTransform | ||
이벤트를 이벤트 흐름으로 전달합니다. | EventDispatcher | ||
Retrieves the axis instance responsible for transforming
the data dimension specified by the dimension parameter. | DataTransform | ||
EventDispatcher 객체에 특정 유형의 이벤트에 대한 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
Transforms x and y coordinates relative to the DataTransform
coordinate system into a two-dimensional value in data space. | DataTransform | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
EventDispatcher 객체에서 리스너를 제거합니다. | EventDispatcher | ||
Assigns an axis instance to a particular dimension of the transform. | DataTransform | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
transformCache(cache:Array, xField:String, xConvertedField:String, yField:String, yConvertedField:String):void
Maps a set of numeric values representing data to screen coordinates. | DataTransform | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object | ||
이 EventDispatcher 객체 또는 조상 객체에 지정한 이벤트 유형에 대한 이벤트 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher |
이벤트 | 요약 | 정의 주체 | ||
---|---|---|---|---|
[브로드캐스트 이벤트] Flash Player 또는 AIR 응용 프로그램이 운영 체제 포커스를 얻어 활성화될 때 전달됩니다. | EventDispatcher | |||
[브로드캐스트 이벤트] Flash Player 또는 AIR 응용 프로그램이 운영 체제 포커스를 잃고 비활성화될 때 전달됩니다. | EventDispatcher | |||
Dispatched when the transformation from data space to screen space has changed, typically either because the axes that make up the transformation have changed in some way, or the data transform itself has size. | DataTransform |
axes | 속성 |
elements | 속성 |
elements:Array
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The elements that are associated with this transform. This Array includes background, series, and overlay elements associated with the transform. This value is assigned by the enclosing chart object.
구현
public function get elements():Array
public function set elements(value:Array):void
DataTransform | () | 생성자 |
public function DataTransform()
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Constructor.
dataChanged | () | 메서드 |
public function dataChanged():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Informs the DataTransform that some of the underlying data being represented on the chart has changed. The DataTransform generally has no knowledge of the source of the underlying data being represented by the chart, so glyphs should call this when their data changes so that the DataTransform can recalculate range scales based on their data. This does not invalidate the DataTransform, because there is no guarantee the data has changed. The axis objects (or range objects) must trigger an invalidate event.
describeData | () | 메서드 |
public function describeData(dimension:String, requiredFields:uint):Array
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Collects important displayed values for all elements associated with this data transform. Axis instances call this method to collect the values they need to consider when auto-generating appropriate ranges. This method returns an Array of BoundedValue objects.
To collect important values for the horizontal axis of a CartesianTransform, pass 0. To collect values for the vertical axis, pass 1.
매개 변수
dimension:String — The dimension to collect values for.
| |
requiredFields:uint — Defines the data that are required
by this transform.
|
Array — A Array of BoundedValue objects.
|
getAxis | () | 메서드 |
public function getAxis(dimension:String):IAxis
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Retrieves the axis instance responsible for transforming
the data dimension specified by the dimension
parameter.
If no axis has been previously assigned, a default axis is created.
The default axis for all dimensions is a LinearAxis
with the autoAdjust
property set to false
.
매개 변수
dimension:String — The dimension whose axis is responsible
for transforming the data.
|
IAxis — The axis instance.
|
관련 API 요소
invertTransform | () | 메서드 |
public function invertTransform(... values):Array
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Transforms x and y coordinates relative to the DataTransform coordinate system into a two-dimensional value in data space.
매개 변수
... values — The x and y positions (in that order).
|
Array — An Array containing the transformed values.
|
setAxis | () | 메서드 |
public function setAxis(dimension:String, v:IAxis):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Assigns an axis instance to a particular dimension of the transform. Axis objects are assigned by the enclosing chart object.
매개 변수
dimension:String — The dimension of the transform.
| |
v:IAxis — The target axis instance.
|
transformCache | () | 메서드 |
public function transformCache(cache:Array, xField:String, xConvertedField:String, yField:String, yConvertedField:String):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Maps a set of numeric values representing data to screen coordinates.
This method assumes the values are all numbers,
so any non-numeric values must have been previously converted
with the mapCache()
method.
매개 변수
cache:Array — An array of objects containing the data values
in their fields. This is also where this function
will store the converted numeric values.
| |
xField:String — The field where the data values for the x axis
can be found.
| |
xConvertedField:String — The field where the mapped x screen coordinate
will be stored.
| |
yField:String — The field where the data values for the y axis
can be found.
| |
yConvertedField:String — The field where the mapped y screen coordinate
will be stored.
|
transformChange | 이벤트 |
mx.events.FlexEvent
속성 FlexEvent.type =
mx.events.FlexEvent.TRANSFORM_CHANGE
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Dispatched when the transformation from data space to screen space has changed, typically either because the axes that make up the transformation have changed in some way, or the data transform itself has size.
TheFlexEvent.TRANSFORM_CHANGE
constant defines the value of the
type
property of the event object for a transformChange
event.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
Tue Jun 12 2018, 03:17 PM Z