Packageardisia.charts.radar
Classpublic class Radar
InheritanceRadar Inheritance ChartBase Inheritance spark.components.supportClasses.SkinnableComponent

Radar chart class. Also known as a polar or spider chart, or a kiviat diagram.

View the technical documentation on the Ardisia Labs website for more information.

Default MXML PropertydataProvider



Public Properties
 PropertyDefined By
  angleOffset : int
The offset for the angle of the initial axis from 0 degrees.
Radar
 InheritedcolorFormatFunction : Function
User provided function that returns the color for the series when passed the series data object.
ChartBase
 InheriteddataProvider : ListCollectionView
The dataProvider for the chart.
ChartBase
 InheriteddataTipHideDelay : Number = 350
Delay before the data tip is hidden.
ChartBase
 InheriteddataTipInstance : IDataRenderer
Instance of the data tip.
ChartBase
  displayIntervalLabels : Boolean
True to display the labels at each interval along the axes.
Radar
  displayRadialAxisLabels : Boolean
True to display the labels at the end of the axes, E.G.
Radar
 InheritedexcludedSeries : Array
Array of the series that should not be displayed.
ChartBase
  form : String
The type of line to draw.
Radar
 InheritedhighlightAlpha : Number = 0.4
When series data is highlighted, the alpha to apply.
ChartBase
 InheritedhighlightDuration : Number = 250
Duration of the highlight effects.
ChartBase
  innerIndent : Number
The number of pixels (radially) from the center to offset the beginning of the axes.
Radar
  intervalsFormatFunction : Function
User provided function that formats the string displayed by the axis interval labels.
Radar
  intervalsPrecision : int
Number of decimal places to use for the axis interval values text.
Radar
  nodeHoverThreshold : Number = 12
The number of pixels within a data point that triggers hover and displays the data tip.
Radar
  numberOfIntervals : int
The number of divisions to draw along the radial axes.
Radar
  radialAxes : Array
An array of RadarAxis objects that describe the radial (category) axes.
Radar
  radialAxisLabelsOffset : Number
The number of pixels to offset the axis labels radially from the ends of the category axes.
Radar
  series : Array
An array of RadarSeries objects that describe the grouped data to display in the chart.
Radar
 InheritedshowDataTip : Boolean = true
True to display a data tip on hover.
ChartBase
  showMarkers : Boolean
True to display markers (circles) at each data point along the line.
Radar
Protected Properties
 PropertyDefined By
 InheritednumberFormatter : NumberFormatter
Default number formatter.
ChartBase
Public Methods
 MethodDefined By
  
Radar
  
getColor(series:RadarSeries):uint
Returns the color for each series.
Radar
 Inherited
Hide the data tip.
ChartBase
  
setHighlightedSeries(items:Object):void
[override] Highlight the passed series.
Radar
Protected Methods
 MethodDefined By
  
Return the minimum and maximum of all the axes.
Radar
  
centerLayoutCircle(radius:Number):void
Used to find the center of the circle that sweeps the n-sided polygon.
Radar
  
drawBackgroundGraphics(xOffset:Number, yOffset:Number, width:Number, height:Number):void
Draw the background related graphics.
Radar
  
eventHandler(event:Event):void
[override] Handles the events for the class.
Radar
  
formatIntervalLabelsText(value:Number):String
Return formatted string to display for the interval labels.
Radar
 Inherited
getDataTipContent(data:Object):Object
Returns the contents for the data tip.
ChartBase
 Inherited
setupDataTip(data:Object):void
Setup the data tip.
ChartBase
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
[override]
ChartBase
  
Update the interval labels skin parts.
Radar
  
Update series renderers.
Radar
Events
 Event Summary Defined By
 InheritedDispatched when the chart's legend should be updated.ChartBase
Styles
 Style Description Defined By
  
arrowHeadLength
Type: Number CSS Inheritance: no
The length of arrow heads on the ends of the radial axes. The default value is 6.
Radar
  
arrowSlope
Type: Number CSS Inheritance: no
The slope used to draw the arrow heads on the ends of the radial axes. The default value is 30.
Radar
  
intervalsStrokeAlpha
Type: Number CSS Inheritance: no
The alpha of the stroke used to draw the interval lines that cross the radial axis lines. The default value is 1.
Radar
  
intervalsStrokeColor
Type: uint Format: Color CSS Inheritance: no
The color of the stroke used to draw the interval lines that cross the radial axis lines. The default value is 0xBBCCDD.
Radar
  
intervalsStrokeThickness
Type: Number CSS Inheritance: no
The thickness of the stroke used to draw the interval lines that cross the radial axis lines. The default value is 2.
Radar
  
markerRadius
Type: Number CSS Inheritance: no
The default radius of the circle markers at each series data point.

Only relevant if the "showMarkers" property is true.

The default value is 5.
Radar
  
quandrantAlternatingAlpha
Type: Array CSS Inheritance: no
A 2 dimensional array of the alternating fill alphas to apply to quadrants. The default value is [0, 0.04].
Radar
  
quandrantAlternatingColors
Type: Array CSS Inheritance: no
A 2 dimensional array of the alternating fill color to apply to quadrants. The default value is [0xFFFFFF, 0x999999].
Radar
  
radialAxisStrokeAlpha
Type: Number CSS Inheritance: no
The alpha of the radial axis stroke. The default value is 1.
Radar
  
radialAxisStrokeColor
Type: uint Format: Color CSS Inheritance: no
The color of the stroke used to draw the axis lines. The default value is 0xBBCCDD.
Radar
  
radialAxisStrokeThickness
Type: Number CSS Inheritance: no
The thickness of the radial axis stroke. The default value is 1.
Radar
  
seriesFillAlpha
Type: Number CSS Inheritance: no
The alpha for the fill applied to the series data lines or curves. The default value is 0.1.
Radar
  
seriesStrokeAlpha
Type: Number CSS Inheritance: no
The alpha of the stroke used for the series data. The default value is 1.
Radar
  
seriesStrokeThickness
Type: Number CSS Inheritance: no
The thickness of the stroke used to draw the lines or curves for the series. The default value is 1.
Radar
Skin Parts

This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.


 Skin Part Description Defined By
 Inherited
dataTipFactoryPart:mx.core.IFactory
Required: false Part Type: Dynamic
Displays the data tip when a node is hovered.

The IFactory must return an object of type IDataRenderer
ChartBase
  
intervalLabelFactoryPart:mx.core.IFactory
Required: false Part Type: Dynamic
Creates and displays the values for the category axis at each interval.

The IFactory must return an object of type IRadarIntervalItemRenderer
Radar
  
radialAxisLabelFactoryPart:mx.core.IFactory
Required: false Part Type: Dynamic
Creates and displays the labels for the categories or the radial axes. Displayed at the ends of each respective axis.

The IFactory must return an object of type Label
Radar
  
seriesFactoryPart:mx.core.IFactory
Required: true Part Type: Dynamic
Creates and displays the series data.

The IFactory must return an object of type IRadarSeriesItemRenderer
Radar
 InheritedRequired: false Part Type: Dynamic
Container for the content added to the skin.
ChartBase
Skin States

To skin the component, implement a skin that defines the following states. Although you must implement all skin states, a skin state can be empty. An empty skin state specifies no changes to the default skin state.


 Skin State Description Defined By
 InheritedChartBase
 InheritedChartBase
Property Detail
angleOffsetproperty
angleOffset:int

The offset for the angle of the initial axis from 0 degrees.

0 degrees for the flash player is the positive direction along the x axis. Put another way, 0 degrees is the direction your thumb points when you put your left hand against the screen and form an L shape with your fingers pointing straight up towards the ceiling. Put even another way, in the cardinal direction system, 0 degrees would be due east.

The default value is 270 (due north).


Implementation
    public function get angleOffset():int
    public function set angleOffset(value:int):void
displayIntervalLabelsproperty 
displayIntervalLabels:Boolean

True to display the labels at each interval along the axes.

The default value is true.


Implementation
    public function get displayIntervalLabels():Boolean
    public function set displayIntervalLabels(value:Boolean):void
displayRadialAxisLabelsproperty 
displayRadialAxisLabels:Boolean

True to display the labels at the end of the axes, E.G. display the category labels.

The default value is true.


Implementation
    public function get displayRadialAxisLabels():Boolean
    public function set displayRadialAxisLabels(value:Boolean):void
formproperty 
form:String

The type of line to draw.

Possibilities are "segment and curve".

The default value is "segment".


Implementation
    public function get form():String
    public function set form(value:String):void
innerIndentproperty 
innerIndent:Number

The number of pixels (radially) from the center to offset the beginning of the axes.

The default value is 35.


Implementation
    public function get innerIndent():Number
    public function set innerIndent(value:Number):void
intervalsFormatFunctionproperty 
intervalsFormatFunction:Function

User provided function that formats the string displayed by the axis interval labels. The function takes a float as an argument and returns a formatted String.

Only relevant if the "displayIntervalLabels" is true.

The function has the following signature:

	  funcName(value:Number):String
	  

The default value is null.


Implementation
    public function get intervalsFormatFunction():Function
    public function set intervalsFormatFunction(value:Function):void
intervalsPrecisionproperty 
intervalsPrecision:int

Number of decimal places to use for the axis interval values text.

Ignored if the "intervalsFormatFunction" property is set.

Only relevant if the "displayIntervalLabels" is true.

The default value is 2.


Implementation
    public function get intervalsPrecision():int
    public function set intervalsPrecision(value:int):void
nodeHoverThresholdproperty 
public var nodeHoverThreshold:Number = 12

The number of pixels within a data point that triggers hover and displays the data tip.

The default value is 12 pixels.

numberOfIntervalsproperty 
numberOfIntervals:int

The number of divisions to draw along the radial axes. An interval value label will be positioned alongside the interval intersection with the axis if the "displayIntervalLabels" property is true.

The minimum value is 2; the beginning and end values

The default value is 3.


Implementation
    public function get numberOfIntervals():int
    public function set numberOfIntervals(value:int):void
radialAxesproperty 
radialAxes:Array

An array of RadarAxis objects that describe the radial (category) axes.

Decided against using a single radialAxis object with a categoryField because then it is difficult for developers to define a max/min for a particular axis.

Changes to the data will not trigger updates. To update the axes and the view, set this property to a new array.

The default value is null.


Implementation
    public function get radialAxes():Array
    public function set radialAxes(value:Array):void
radialAxisLabelsOffsetproperty 
radialAxisLabelsOffset:Number

The number of pixels to offset the axis labels radially from the ends of the category axes.

The default value is 35.


Implementation
    public function get radialAxisLabelsOffset():Number
    public function set radialAxisLabelsOffset(value:Number):void
seriesproperty 
series:Array

An array of RadarSeries objects that describe the grouped data to display in the chart.

Changes to the data will not trigger updates. To update, set this property to a new array.

The default value is null.

This property can be used as the source for data binding.


Implementation
    public function get series():Array
    public function set series(value:Array):void
showMarkersproperty 
showMarkers:Boolean

True to display markers (circles) at each data point along the line.

The default value is true.


Implementation
    public function get showMarkers():Boolean
    public function set showMarkers(value:Boolean):void
Constructor Detail
Radar()Constructor
public function Radar()



Method Detail
calculateAxesMinMax()method
protected function calculateAxesMinMax():Array

Return the minimum and maximum of all the axes.

Returns
Array — an array of min/max "[min, max]" values for each axis
centerLayoutCircle()method 
protected function centerLayoutCircle(radius:Number):void

Used to find the center of the circle that sweeps the n-sided polygon.

Parameters

radius:Number — the radius of the circle that sweeps the polygon

drawBackgroundGraphics()method 
protected function drawBackgroundGraphics(xOffset:Number, yOffset:Number, width:Number, height:Number):void

Draw the background related graphics.

Parameters

xOffset:Number — pixels in the x coordinate to offset the drawing
 
yOffset:Number — pixels in the y coordinate to offset the drawing
 
width:Number
 
height:Number

eventHandler()method 
override protected function eventHandler(event:Event):void

Handles the events for the class.

Parameters

event:Event — the Event that triggered the handler

formatIntervalLabelsText()method 
protected function formatIntervalLabelsText(value:Number):String

Return formatted string to display for the interval labels.

Parameters

value:Number — the Number to format

Returns
String — a formatted String
getColor()method 
public function getColor(series:RadarSeries):uint

Returns the color for each series. First applies the color via the colorFormatFunction, next uses the color defined on the series axis, and finally uses a default coloring scheme.

Parameters

series:RadarSeries — the RadarSeries to colorize

Returns
uint — uint color
setHighlightedSeries()method 
override public function setHighlightedSeries(items:Object):void

Highlight the passed series.

Pass a null value to remove any applied effects.

Parameters

items:Object — Object

updateIntervalFactoryLabel()method 
protected function updateIntervalFactoryLabel():void

Update the interval labels skin parts.

updateSeriesFactoryPart()method 
protected function updateSeriesFactoryPart():void

Update series renderers.