mx.charts

# ChartItem - AS3 Flex

Package | mx.charts
Class | public class ChartItem
Inheritance | ChartItem EventDispatcher Object
Subclasses | AreaSeriesItem, BarSeriesItem, BubbleSeriesItem, ColumnSeriesItem, HLOCSeriesItem, LineSeriesItem, PieSeriesItem, PlotSeriesItem

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

A ChartItem represents a single item in a ChartSeries. In most standard series, there is one ChartItem created for each item in the series' dataProvider collection. ChartItems are passed to the instances of a series' itemRenderer for rendering. Most Series types extend ChartItem to contain additional information specific to the chart type.

More examples

Skinning ChartItem objects
Selecting chart items
Using the selection API to create new charts
Dragging and dropping ChartItem objects

Learn more

Working with ChartItem objects to access chart data

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | currentState : String Defines the appearance of the ChartItem. | ChartItem
|  | element : IChartElement The series or element that owns the ChartItem. | ChartItem
|  | index : int The index of the data from the series' data provider that the ChartItem represents. | ChartItem
|  | item : Object The item from the series' data provider that the ChartItem represents. | ChartItem
|  | itemRenderer : IFlexDisplayObject The instance of the chart's itemRenderer that represents this ChartItem. | ChartItem

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | ChartItem(element:IChartElement = null, item:Object = null, index:uint = 0) Constructor. | ChartItem
|  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. | EventDispatcher
|  | clone():ChartItem Returns a copy of this ChartItem. | ChartItem
|  | dispatchEvent(event:Event):Boolean Dispatches an event into the event flow. | EventDispatcher
|  | hasEventListener(type:String):Boolean Checks whether the EventDispatcher object has any listeners registered for a specific type of event. | EventDispatcher
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void Removes a listener from the EventDispatcher object. | EventDispatcher
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object
|  | willTrigger(type:String):Boolean Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | EventDispatcher

Events
Click for more information on events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | activate | [broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher
|  | deactivate | [broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher

Public Constants

| Constant | Defined By
--- | --- | ---
|  | DISABLED : String = "disabled" [static] Value that indicates the ChartItem appears disabled and cannot be selected. | ChartItem
|  | FOCUSED : String = "focused" [static] Value that indicates the ChartItem has focus but does not appear to be selected. | ChartItem
|  | FOCUSEDSELECTED : String = "focusedSelected" [static] Value that indicates the ChartItem appears to have focus and appears to be selected. | ChartItem
|  | NONE : String = "none" [static] Value that indicates the ChartItem does not appear to be selected, does not have focus, and is not being rolled over. | ChartItem
|  | ROLLOVER : String = "rollOver" [static] Value that indicates the ChartItem appears as if the mouse was over it. | ChartItem
|  | SELECTED : String = "selected" [static] Value that indicates the ChartItem appears selected but does not have focus. | ChartItem

Property Detail

### currentState

property

`currentState:String`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Defines the appearance of the ChartItem. The `currentState` property can be set to `none`, `rollOver`, `selected`, `disabled`, `focusSelected`, and `focused`.

Implementation
`public function get currentState():String`
`public function set currentState(value:String):void`

### element

property

`public var element:IChartElement`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The series or element that owns the ChartItem.

### index

property

`public var index:int`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The index of the data from the series' data provider that the ChartItem represents.

### item

property

`public var item:Object`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The item from the series' data provider that the ChartItem represents.

### itemRenderer

property

`public var itemRenderer:IFlexDisplayObject`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The instance of the chart's itemRenderer that represents this ChartItem.

Constructor Detail

### ChartItem

()
Constructor

`public function ChartItem(element:IChartElement = null, item:Object = null, index:uint = 0)`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Constructor.

Parameters

| `element:IChartElement` (default = `null`)`` — The series or element to which the ChartItem belongs.
| `item:Object` (default = `null`)`` — The item from the series' data provider that the ChartItem represents.
| `index:uint` (default = `0`)`` — The index of the data from the series' data provider that the ChartItem represents.

Method Detail

### clone

()
method

`public function clone():ChartItem`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Returns a copy of this ChartItem.

Returns

| `ChartItem` — A copy of this ChartItem.

Constant Detail

### DISABLED

Constant

`public static const DISABLED:String = "disabled"`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Value that indicates the ChartItem appears disabled and cannot be selected.

### FOCUSED

Constant

`public static const FOCUSED:String = "focused"`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Value that indicates the ChartItem has focus but does not appear to be selected.

### FOCUSEDSELECTED

Constant

`public static const FOCUSEDSELECTED:String = "focusedSelected"`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Value that indicates the ChartItem appears to have focus and appears to be selected.

### NONE

Constant

`public static const NONE:String = "none"`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Value that indicates the ChartItem does not appear to be selected, does not have focus, and is not being rolled over.

### ROLLOVER

Constant

`public static const ROLLOVER:String = "rollOver"`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Value that indicates the ChartItem appears as if the mouse was over it.

### SELECTED

Constant

`public static const SELECTED:String = "selected"`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Value that indicates the ChartItem appears selected but does not have focus.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00