套件 | mx.charts |
類別 | public class LogAxis |
繼承 | LogAxis 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.
A LogAxis object cannot correctly render negative values,
as Log10() of a negative number is undefined
.
MXML 語法隱藏 MXML 語法The <mx:LogAxis>
tag inherits all the properties
of its parent classes and adds the following properties:
<mx:LogAxis Properties interval="10" maximum="null" maximumLabelPrecision="null" minimum="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 multiplier label values along the axis. | LogAxis | ||
labelFunction : Function
Called to format axis values for display as labels. | NumericAxis | ||
maximum : Number
Specifies the maximum value for an axis label. | LogAxis | ||
maximumLabelPrecision : Number
Specifies the maximum number of decimal places for representing fractional
values on the labels generated by this axis. | LogAxis | ||
minimum : Number
Specifies the minimum value for an axis label. | LogAxis | ||
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 |
方法 | 定義自 | ||
---|---|---|---|
LogAxis()
Constructor. | LogAxis | ||
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 multiplier label values along the axis.
A value of 10 generates labels at 1, 10, 100, 1000, etc.,
while a value of 100 generates labels at 1, 100, 10000, etc.
Flex calculates the interval if this property
is set to NaN
.
Intervals must be even powers of 10, and must be greater than or equal to 10.
The LogAxis rounds the interval down to an even power of 10, if necessary.
預設值為 10。
實作
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 NaN
, Flex determines the maximum value
from the data in the chart.
The maximum value must be an even power of 10.
The LogAxis rounds an explicit maximum value
up to an even power of 10, if necessary.
預設值為 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 round 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 minimum value must be an even power of 10.
The LogAxis will round an explicit minimum value
downward to an even power of 10 if necessary.
預設值為 NaN。
實作
public function get minimum():Number
public function set minimum(value:Number):void
LogAxis | () | 建構函式 |
public function LogAxis()
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Constructor.
<?xml version="1.0"?> <!-- Simple example to demonstrate the LogAxis 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] private var expensesAC:ArrayCollection = new ArrayCollection( [ { Month: "Jan", Profit: 20000, Expenses: 1500, Amount: 450 }, { Month: "Feb", Profit: 1000, Expenses: 15000, Amount: 600 }, { Month: "Mar", Profit: 15000, Expenses: 5000, Amount: 300 }, { Month: "Apr", Profit: 1800, Expenses: 1200, Amount: 900 }, { Month: "May", Profit: 2400, Expenses: 575, Amount: 500 } ]); ]]> </fx:Script> <mx:Panel title="LogAxis Example" height="100%" width="100%"> <mx:LineChart id="linechart" height="100%" width="100%" paddingLeft="5" paddingRight="5" showDataTips="true" dataProvider="{expensesAC}"> <mx:horizontalAxis> <mx:CategoryAxis categoryField="Month"/> </mx:horizontalAxis> <mx:verticalAxis> <mx:LogAxis interval="10"/> </mx:verticalAxis> <mx:series> <mx:LineSeries yField="Profit" form="curve" displayName="Profit"/> <mx:LineSeries yField="Expenses" form="curve" displayName="Expenses"/> <mx:LineSeries yField="Amount" form="curve" displayName="Amount"/> </mx:series> </mx:LineChart> <mx:Legend dataProvider="{linechart}"/> </mx:Panel> </s:Application>
Tue Jun 12 2018, 03:47 PM Z