패키지 | mx.charts |
클래스 | public class LinearAxis |
상속 | LinearAxis NumericAxis AxisBase EventDispatcher Object |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
minimum
, maximum
,
and interval
values from the charting data
to fit all of the chart elements on the screen.
You can also explicitly set specific values for these properties.
The auto-determination of range values works as follows:
- Flex determines a minimum and maximum value that accomodates all the data being displayed in the chart.
- If the
autoAdjust
andbaseAtZero
properties are set totrue
, Flex makes the following adjustments:- If all values are positive,
Flex sets the
minimum
property to zero. - If all values are negative,
Flex sets the
maximum
property to zero.
- If all values are positive,
Flex sets the
- If the
autoAdjust
property is set totrue
, Flex adjusts values of theminimum
andmaximum
properties by rounding them up or down. - Flex checks if any of the elements displayed in the chart
require extra padding to display properly (for example, for labels).
It adjusts the values of the
minimum
andmaximum
properties accordingly. - Flex determines if you have explicitly specified any padding
around the
minimum
andmaximum
values, and adjusts their values accordingly.
The <mx:LinearAxis>
tag inherits all the properties
of its parent classes and adds the following properties:
<mx:LinearAxis Properties interval="null" maximum="null" maximumLabelPrecision="null" minimum="null" minorInterval="null" />
기타 예제
관련 API 요소
속성 | 정의 주체 | ||
---|---|---|---|
autoAdjust : Boolean
Specifies whether Flex rounds values. | NumericAxis | ||
baseAtZero : Boolean
Specifies whether Flex tries to keep the minimum
and maximum values rooted at zero. | NumericAxis | ||
baseline : Number [읽기 전용]
The computed minimum value for the axis
as long as this value is greater than 0. | NumericAxis | ||
chartDataProvider : Object [쓰기 전용]
The data provider assigned to the enclosing chart. | AxisBase | ||
computedMaximum : Number
The computed maximum value represented by this axis. | NumericAxis | ||
computedMinimum : Number
The computed minimum value represented by this axis. | NumericAxis | ||
constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | ||
direction : String
Determines the direction in which the axis is rendered. | NumericAxis | ||
displayName : String
The name of the axis. | AxisBase | ||
interval : Number
Specifies the numeric difference between label values along the axis. | LinearAxis | ||
labelFunction : Function
Called to format axis values for display as labels. | NumericAxis | ||
maximum : Number
Specifies the maximum value for an axis label. | LinearAxis | ||
maximumLabelPrecision : Number
Specifies the maximum number of decimal places for representing fractional values on the labels
generated by this axis. | LinearAxis | ||
minimum : Number
Specifies the minimum value for an axis label. | LinearAxis | ||
minorInterval : Number
Specifies the numeric difference between minor tick marks along the axis. | LinearAxis | ||
minorTicks : Array [읽기 전용]
An Array of minor tick marks generated to represent this axis. | NumericAxis | ||
padding : Number
Specifies padding that Flex adds to the calculated minimum and maximum
values for the axis when rendering the values on the screen. | NumericAxis | ||
parseFunction : Function
Specify a parseFunction to customize how
the values rendered by your chart are converted into numeric values. | NumericAxis | ||
title : String
The text for the title displayed along the axis. | AxisBase | ||
unitSize : Number [읽기 전용]
The size of one unit of data as represented by this axis. | AxisBase |
메서드 | 정의 주체 | ||
---|---|---|---|
Constructor. | LinearAxis | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
리스너에서 이벤트 알림을 받을 수 있도록 EventDispatcher 객체에 이벤트 리스너 객체를 등록합니다. | EventDispatcher | ||
Triggers events that inform the range object
when the chart data has changed. | AxisBase | ||
이벤트를 이벤트 흐름으로 전달합니다. | EventDispatcher | ||
Filters a set of values of arbitrary type
to a set of numbers that can be mapped. | NumericAxis | ||
Formats values for display in DataTips. | NumericAxis | ||
Determines the range to estimate what the axis labels should be. | NumericAxis | ||
Gets the labels text that is rendered. | NumericAxis | ||
EventDispatcher 객체에 특정 유형의 이벤트에 대한 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
Maps a position along the axis back to a numeric data value. | NumericAxis | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
Converts a set of values of arbitrary type
to a set of numbers that can be transformed into screen coordinates. | NumericAxis | ||
Determines how the axis handles overlapping labels. | NumericAxis | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
Invoked when an AxisRenderer is unable to cleanly render
the labels without overlap, and would like the Axis object
to reduce the set of labels. | NumericAxis | ||
Each DataTransform that makes use of an axis
registers itself with that axis. | AxisBase | ||
EventDispatcher 객체에서 리스너를 제거합니다. | EventDispatcher | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
Maps a set of values from data space to screen space. | NumericAxis | ||
Each DataTransform that makes use of an axis
registers itself with that axis. | AxisBase | ||
Updates the chart. | NumericAxis | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object | ||
이 EventDispatcher 객체 또는 조상 객체에 지정한 이벤트 유형에 대한 이벤트 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher |
interval | 속성 |
interval:Number
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Specifies the numeric difference between label values along the axis.
Flex calculates the interval if this property
is set to NaN
.
The default value is NaN
.
구현
public function get interval():Number
public function set interval(value:Number):void
maximum | 속성 |
maximum:Number
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Specifies the maximum value for an axis label.
If you set the autoAdjust
property to true
,
Flex calculates this value.
If NaN
, Flex determines the maximum value
from the data in the chart.
The default value is NaN
.
구현
public function get maximum():Number
public function set maximum(value:Number):void
maximumLabelPrecision | 속성 |
maximumLabelPrecision:Number
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Specifies the maximum number of decimal places for representing fractional values on the labels generated by this axis. By default, the axis autogenerates this value from the labels themselves. A value of 0 rounds to the nearest integer value, while a value of 2 rounds to the nearest 1/100th of a value.
구현
public function get maximumLabelPrecision():Number
public function set maximumLabelPrecision(value:Number):void
minimum | 속성 |
minimum:Number
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Specifies the minimum value for an axis label.
If NaN
, Flex determines the minimum value
from the data in the chart.
The default value is NaN
.
구현
public function get minimum():Number
public function set minimum(value:Number):void
minorInterval | 속성 |
minorInterval:Number
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Specifies the numeric difference between minor tick marks along the axis.
Flex calculates the difference if this property
is set to NaN
.
구현
public function get minorInterval():Number
public function set minorInterval(value:Number):void
LinearAxis | () | 생성자 |
public function LinearAxis()
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Constructor.
<?xml version="1.0"?> <!-- Simple example to demonstrate the HLOCChart control. --> <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] private var stockDataAC:ArrayCollection = new ArrayCollection( [ { Date: "25-Jul", Open: 40.55, High: 40.75, Low: 40.24, Close:40.31}, { Date: "26-Jul", Open: 40.15, High: 40.78, Low: 39.97, Close:40.34}, { Date: "27-Jul", Open: 40.38, High: 40.66, Low: 40, Close:40.63}, { Date: "28-Jul", Open: 40.49, High: 40.99, Low: 40.3, Close:40.98}, { Date: "29-Jul", Open: 40.13, High: 40.4, Low: 39.65, Close:39.95}, { Date: "1-Aug", Open: 39.00, High: 39.50, Low: 38.7, Close:38.6}, { Date: "2-Aug", Open: 38.68, High: 39.34, Low: 37.75, Close:38.84}, { Date: "3-Aug", Open: 38.76, High: 38.76, Low: 38.03, Close:38.12}, { Date: "4-Aug", Open: 37.98, High: 37.98, Low: 36.56, Close:36.69}, { Date: "5-Aug", Open: 36.61, High: 37, Low: 36.48, Close:36.86} ]); ]]> </fx:Script> <fx:Declarations> <!-- Define custom Stroke for the wick and ticks. --> <mx:SolidColorStroke id="s1" color="0x000000" weight="5" joints="bevel" caps="square"/> </fx:Declarations> <mx:Panel title="HLOCChart Control Example" height="100%" width="100%"> <mx:HLOCChart id="hlocchart" height="100%" width="100%" paddingRight="5" paddingLeft="5" showDataTips="true" dataProvider="{stockDataAC}"> <mx:verticalAxis> <mx:LinearAxis id="vaxis" baseAtZero="false" title="Price"/> </mx:verticalAxis> <mx:horizontalAxis> <mx:CategoryAxis id="haxis" categoryField="Date" title="Date"/> </mx:horizontalAxis> <mx:horizontalAxisRenderers> <mx:AxisRenderer axis="{haxis}" canDropLabels="true"/> </mx:horizontalAxisRenderers> <mx:series> <mx:HLOCSeries openField="Open" highField="High" lowField="Low" closeField="Close" stroke="{s1}" openTickStroke="{s1}" closeTickStroke="{s1}" openTickLength="7" closeTickLength="7" /> </mx:series> </mx:HLOCChart> </mx:Panel> </s:Application>
Tue Jun 12 2018, 03:17 PM Z