Apache Flex 4.16.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
IChartElement2

Package | mx.charts.chartClasses
Interface | public interface IChartElement2 extends IChartElement, IFlexDisplayObject, flash.display.IBitmapDrawable, flash.events.IEventDispatcher
Implementors | ChartElement

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

IChartElement2 defines the base set of properties and methods required by a UIComponent to be representable in the data space of a chart. Any component assigned to the series, backgroundElements, or annotationElements Arrays of a chart must implement this interface.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | accessibilityProperties : AccessibilityProperties | IFlexDisplayObject
|  | alpha : Number | IFlexDisplayObject
|  | blendMode : String | IFlexDisplayObject
|  | cacheAsBitmap : Boolean | IFlexDisplayObject
|  | chartDataProvider : Object [write-only] The data provider assigned to the enclosing chart. | IChartElement
|  | dataTransform : DataTransform [write-only] The DataTransform object that the element uses to map between data and screen coordinates. | IChartElement
|  | filters : Array | IFlexDisplayObject
|  | height : Number | IFlexDisplayObject
|  | labelContainer : Sprite [read-only] The DisplayObject that displays labels rendered by this element. | IChartElement
|  | loaderInfo : LoaderInfo [read-only] | IFlexDisplayObject
|  | mask : DisplayObject | IFlexDisplayObject
|  | measuredHeight : Number [read-only] The measured height of this object. | IFlexDisplayObject
|  | measuredWidth : Number [read-only] The measured width of this object. | IFlexDisplayObject
|  | mouseX : Number [read-only] | IFlexDisplayObject
|  | mouseY : Number [read-only] | IFlexDisplayObject
|  | name : String | IFlexDisplayObject
|  | opaqueBackground : Object | IFlexDisplayObject
|  | parent : DisplayObjectContainer [read-only] | IFlexDisplayObject
|  | root : DisplayObject [read-only] | IFlexDisplayObject
|  | rotation : Number | IFlexDisplayObject
|  | scale9Grid : Rectangle | IFlexDisplayObject
|  | scaleX : Number | IFlexDisplayObject
|  | scaleY : Number | IFlexDisplayObject
|  | scrollRect : Rectangle | IFlexDisplayObject
|  | stage : Stage [read-only] | IFlexDisplayObject
|  | transform : Transform | IFlexDisplayObject
|  | visible : Boolean | IFlexDisplayObject
|  | width : Number | IFlexDisplayObject
|  | x : Number | IFlexDisplayObject
|  | y : Number | IFlexDisplayObject

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | chartStateChanged(oldState:uint, v:uint):void Called by the enclosing chart to indicate that the current state of the chart has changed. | IChartElement
|  | claimStyles(styles:Array, firstAvailable:uint):uint Called by the chart to allow associated elements to claim style selectors from its chartSeriesStyles Array. | IChartElement
|  | collectTransitions(chartState:Number, transitions:Array):void Called by the enclosing chart to collect any transitions a particular element might play when the chart changes state. | IChartElement
|  | dataToLocal(... dataValues):Point Converts a tuple of data values to an x-y coordinate on screen. | IChartElement2
|  | describeData(dimension:String, requiredFields:uint):Array Called by the governing DataTransform to obtain a description of the data represented by this IChartElement. | IChartElement
|  | findDataPoints(x:Number, y:Number, sensitivity2:Number):Array Returns a HitData object describing the nearest data point to the coordinates passed to the method. | IChartElement
|  | getAllDataPoints():Array Returns an array of HitData of the items of all the underlying objects that implement IChartElement2 whose dataTips are to be shown when showAllDataTips is set to true on chart. | IChartElement2
|  | getBounds(targetCoordinateSpace:DisplayObject):Rectangle | IFlexDisplayObject
|  | getRect(targetCoordinateSpace:DisplayObject):Rectangle | IFlexDisplayObject
|  | globalToLocal(point:Point):Point | IFlexDisplayObject
|  | hitTestObject(obj:DisplayObject):Boolean | IFlexDisplayObject
|  | hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean | IFlexDisplayObject
|  | localToData(pt:Point):Array Converts a coordinate on screen to a tuple of data values. | IChartElement2
|  | localToGlobal(point:Point):Point | IFlexDisplayObject
|  | mappingChanged():void Indicates to the element that the data mapping of the associated axes has changed. | IChartElement
|  | move(x:Number, y:Number):void Moves this object to the specified x and y coordinates. | IFlexDisplayObject
|  | setActualSize(newWidth:Number, newHeight:Number):void Sets the actual size of this object. | IFlexDisplayObject

Method Detail

dataToLocal | () | method

`public function dataToLocal(... dataValues):Point`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Converts a tuple of data values to an x-y coordinate on screen. Call this function to transform data on to the screen using the same transform that the individual elements go through. For example, to create a custom highlight for a data region of a chart, you might use this function to determine the on-screen coordinates of the range of interest.

For Cartesian chartelements, you typically pass two values. The first value maps to the horizontal axis, and the second value maps to the vertical axis.

For polar charts, the first value maps to the angular axis, and the second maps to the radial axis.

Parameters

| `... dataValues` — The data values to convert to coordinates.

Returns

| `Point` — Coordinates that are relative to the chart.

getAllDataPoints | () | method |

`public function getAllDataPoints():Array`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Returns an array of HitData of the items of all the underlying objects that implement `IChartElement2` whose dataTips are to be shown when `showAllDataTips` is set to `true` on chart.

Returns

| `Array` — The HitData objects describing the data points

localToData | () | method |

`public function localToData(pt:Point):Array`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Converts a coordinate on screen to a tuple of data values. Call this function to determine what data values a particular point on-screen represents.

Individual chart types determine how this transformation occurs. The point should be relative to the chart's coordinate space.

Parameters

| `pt:Point` — The Point to convert.

Returns

| `Array` — The tuple of data values.

Sun Mar 5 2017, 03:42 PM +11:00