Packagefr.kapit.ringchart
Classpublic class RingChart
InheritanceRingChart Inheritance fr.kapit.licence.KapUIComponent



Public Properties
 PropertyDefined by
  callOutContainer : Sprite
[read-only]
RingChart
  colorFunction : Function
The first color used to generate nodes colors.
RingChart
  colorPolicy : String
Indicates the policy used to generate colors for the nodes.
RingChart
  csvDelimiter : String
CSV delimiter.
RingChart
  customToolTipClass : Class
Indicates the class to be used to create the ringChart tooltips.
RingChart
  dataProvider : Object
Data displayed by the ring Chart.
RingChart
  filterPath : Array
Analysis Path is used for CSV and General XML files and enables data source analysis with a given logic.
RingChart
  firstColor : uint
The first color used to generate nodes colors.
RingChart
  gapBetweenRings : Number
specifiy the gap between rings
RingChart
  gapBetweenWedges : Number
specify the distance between the different wedges
RingChart
  getDataAsSeries : Boolean
specifiy if the data source is provided as series or nop User should put this property in True if every item of the data provider is a Serie (presented by a ring on the RingChart), unless if the data are in orthogonal structure this property should be set on False
RingChart
  innerRadius : Number
Inner Radius displayed by the ring Chart.
RingChart
  labels : Array
RingChart
  lastColor : uint
The second color used to generate nodes colors.
RingChart
  leftEspacement : int
RingChart
  leftLabels : ArrayCollection
RingChart
  _maxRadius : Number
RingChart
  mergeDescriptor : MergeDescriptor
This Class instance defines merging tasks that must be applied on a CSV (or ICollectionView) source before displaying it.
RingChart
  radialDisplacement : Number
specify the distance of displacement of the wedge when clicking on
RingChart
  radius : Number
OuterRadius displayed by the ring Chart.
RingChart
  recordDelimiter : String
Record delimiter of CSV fields.
RingChart
  reportingFunctions : Dictionary
Reporting functions used to compute a data field from an array of data fields generated after CSV parsing or advanced XML treatment.
RingChart
  rightDownLabels : ArrayCollection
RingChart
  rightEspacement : int
RingChart
  rightUpLabels : ArrayCollection
RingChart
  rings : Array
this property define the array of the rings used to draw all the ringchart
RingChart
  ringSize : Boolean
Specify the ring size: by default , the ringChart can handle an illimited number of series and it will display them even if the ring size is very small ( we can even have a circle).
RingChart
  selectedSerie : Number
SelectedSerie get the index of the serie when clicking on an item in the dataGrid
RingChart
  selectedWedge : String
Ensure the interconnexion between the ringChart and other components in fact when clicking on a data on the grid the SelectedWedge property will get the name of the wedge and the applying a filter on it.
RingChart
  seriesLegend : RingLegend
A legend containing the list of the RingChart series.
RingChart
  transitionAspect : String
this porperty is used to define the effect aspect when exploding a wedge
RingChart
  tweenerArray : Array
RingChart
  typesDescriptor : Dictionary
Column types descriptor.
RingChart
  viewLabel : Boolean
show the labels in a callout way: in fact when this labelShow is set the labels will be displayet on the outer ring in a callout way.
RingChart
  viewPercentage : Boolean
This property is used to show the percentage on the ringChart: when this property is set to true, the percentage values will be displayed on the different rings.
RingChart
  viewTooltips : Boolean
this property should be set to True when the user want to show the toolTip in each wedge
RingChart
  withHeaders : Boolean
Indicator if CSV file first row are headers or not.
RingChart
Public Methods
 MethodDefined by
  
Creates a new RingChart instance.
RingChart
Protected Methods
 MethodDefined by
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
RingChart
Events
 EventSummaryDefined by
    RingChart
Public Constants
 ConstantDefined by
  COLOR_POLICY_BICHROMATIC : String = "bichromatic"
[static] Colors are generated by mixing firstColor and secondColor.
RingChart
  COLOR_POLICY_MONOCHROMATIC : String = "monochromatic"
[static] Colors are generated by mixing firstColor and black.
RingChart
  COLOR_POLICY_SPECTRUM : String = "spectrum"
[static] Colors are generated by mixing red, green and blue colors.
RingChart
  DEG_TO_RAD : Number = 0.017453292519943295
[static]
RingChart
Property detail
callOutContainerproperty
callOutContainer:Sprite  [read-only]Implementation
    public function get callOutContainer():Sprite
colorFunctionproperty 
colorFunction:Function  [read-write]

The first color used to generate nodes colors.

Implementation
    public function get colorFunction():Function
    public function set colorFunction(value:Function):void
colorPolicyproperty 
colorPolicy:String  [read-write]

Indicates the policy used to generate colors for the nodes.

Implementation
    public function get colorPolicy():String
    public function set colorPolicy(value:String):void

See also

csvDelimiterproperty 
csvDelimiter:String  [read-write]

CSV delimiter.

The default value is ;.

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

Implementation
    public function get csvDelimiter():String
    public function set csvDelimiter(value:String):void
customToolTipClassproperty 
customToolTipClass:Class  [read-write]

Indicates the class to be used to create the ringChart tooltips. This class must implement the IRingChartToolTip interface.

The default value is null.

Implementation
    public function get customToolTipClass():Class
    public function set customToolTipClass(value:Class):void
dataProviderproperty 
dataProvider:Object  [read-write]

Data displayed by the ring Chart.

Implementation
    public function get dataProvider():Object
    public function set dataProvider(value:Object):void
filterPathproperty 
filterPath:Array  [read-write]

Analysis Path is used for CSV and General XML files and enables data source analysis with a given logic. For CSV files(like other formats), the analysis path is an Array with only one string (can be 2 but not advised) containing the considered columns header. This property can be used as the source for data binding.

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

Implementation
    public function get filterPath():Array
    public function set filterPath(value:Array):void

Example
Given the following CSV file, one of the analysis Paths should be ["Entreprise"], the delimiter should be "," and the record delimiter should be "/"". "Entreprise","Profit (KE)","Employees Number" "Enterp1","1000","22" "Enterp2","1200","30" "Enterp3","1500","100" "Enterp4","1500","15" "Enterp5","1460","10" "Enterp6","3000","28" ...

firstColorproperty 
firstColor:uint  [read-write]

The first color used to generate nodes colors.

Implementation
    public function get firstColor():uint
    public function set firstColor(value:uint):void
gapBetweenRingsproperty 
gapBetweenRings:Number  [read-write]

specifiy the gap between rings

Implementation
    public function get gapBetweenRings():Number
    public function set gapBetweenRings(value:Number):void
gapBetweenWedgesproperty 
gapBetweenWedges:Number  [read-write]

specify the distance between the different wedges

Implementation
    public function get gapBetweenWedges():Number
    public function set gapBetweenWedges(value:Number):void
getDataAsSeriesproperty 
getDataAsSeries:Boolean  [read-write]

specifiy if the data source is provided as series or nop User should put this property in True if every item of the data provider is a Serie (presented by a ring on the RingChart), unless if the data are in orthogonal structure this property should be set on False

Implementation
    public function get getDataAsSeries():Boolean
    public function set getDataAsSeries(value:Boolean):void
innerRadiusproperty 
innerRadius:Number  [read-write]

Inner Radius displayed by the ring Chart.

Implementation
    public function get innerRadius():Number
    public function set innerRadius(value:Number):void
labelsproperty 
public var labels:Array
lastColorproperty 
lastColor:uint  [read-write]

The second color used to generate nodes colors.

Implementation
    public function get lastColor():uint
    public function set lastColor(value:uint):void
leftEspacementproperty 
public var leftEspacement:int
leftLabelsproperty 
public var leftLabels:ArrayCollection
_maxRadiusproperty 
public var _maxRadius:Number
mergeDescriptorproperty 
mergeDescriptor:MergeDescriptor  [read-write]

This Class instance defines merging tasks that must be applied on a CSV (or ICollectionView) source before displaying it. In fact, a MergeDescriptor instance is a set of MergeEntity instances, each one defines columns to be merged in one column according to a merging function. A MergeEntity instance is created by defining :

A MergeEntity is a unit merging task that must be added to the MergeDescriptor to be taken into account using the addMergeDescription(mergeEntity) method. When merging, the developer can choose between leaving the content of merged columns to be taken into account when performing data processing and adding the merging column or replacing them by the resulting column. This can be accomplished by setting to true or false the leaveMergeColumns of the MergeDescriptor instance. The mergingDescriptor should be used only with CSV files.

The default value is null.

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

Implementation
    public function get mergeDescriptor():MergeDescriptor
    public function set mergeDescriptor(value:MergeDescriptor):void

Example
//Assuming a CSV that have two columns named "work_days" and "total_days" and that we want to merge them into // a "holidays" column via a substraction function named mergeFunction var mergeDescriptor:MergeDescriptor=new MergeDescriptor(); // Initializing a merge Descriptor var mergeEntity:MergeEntity=new MergeEntity(["work_days","total_days"],"holidays",mergeFunction); // Merging _"work_days"_ and _"total_days"_ into a _holidays_ column mergeDescriptor.addMergeDescription(mergeEntity); // Adding the merge entity to the merge descriptor mergeDescriptor.leaveMergeColumns=false; // Replace merged columns with new resulting column (_holidays_ column) myRingChart.mergeDescriptor=mergeDescriptor; // Assigning Merging Descriptor ... private function mergeFunction(arr:Array):Number { if(arr.length!=2) return 0; return Number(arr[1])-Number(arr[0]); }

radialDisplacementproperty 
radialDisplacement:Number  [read-write]

specify the distance of displacement of the wedge when clicking on

Implementation
    public function get radialDisplacement():Number
    public function set radialDisplacement(value:Number):void
radiusproperty 
radius:Number  [read-write]

OuterRadius displayed by the ring Chart.

Implementation
    public function get radius():Number
    public function set radius(value:Number):void
recordDelimiterproperty 
recordDelimiter:String  [read-write]

Record delimiter of CSV fields.

The default value is null.

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

Implementation
    public function get recordDelimiter():String
    public function set recordDelimiter(value:String):void
reportingFunctionsproperty 
reportingFunctions:Dictionary  [read-write]

Reporting functions used to compute a data field from an array of data fields generated after CSV parsing or advanced XML treatment. In fact, when building data sets and their corresponding data from a given column (or attribute), several rows are grouped into one row and each data field content (attribute column/attribute) is added to an array. Transforming the data fields arrays into a real data by applying standard or custom functions can be very important to have correct and coherent data for nodes data. The reportingFunctions property is a Dictionary that assigns to a given column key (column name for CSV) or attribute (for XML) its reporting function. This function should accept as parameters an array and a type class (uint for example). Actually, there are two standard functions that can be accessed statically from the ReportingUtils class:

The default value is null.

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

Implementation
    public function get reportingFunctions():Dictionary
    public function set reportingFunctions(value:Dictionary):void

Example
//Assuming a CSV that have six columns ( "Entreprise", "Profit", "Employees Number", "Engineers Number", "Architect Number", "Commercials Number") The following snippet shows how reporting functions solves the of computing mean values on some columns while keeping default sum function on other columns. var reportingFunctions:Dictionary=new Dictionary(); reportingFunctions["Profit"]=ReportingUtils.sum; reportingFunctions["Employees Number"]=ReportingUtils.mean; ... myRingChart.reportingFunctions=reportingFunctions;

rightDownLabelsproperty 
public var rightDownLabels:ArrayCollection
rightEspacementproperty 
public var rightEspacement:int
rightUpLabelsproperty 
public var rightUpLabels:ArrayCollection
ringsproperty 
rings:Array  [read-write]

this property define the array of the rings used to draw all the ringchart

Implementation
    public function get rings():Array
    public function set rings(value:Array):void
ringSizeproperty 
ringSize:Boolean  [read-write]

Specify the ring size: by default , the ringChart can handle an illimited number of series and it will display them even if the ring size is very small ( we can even have a circle). However when setting the ringSize property: the ringChart will display not all the series, depending on the unscaled width and height, but it will display rings with a minimum size of 10

Implementation
    public function get ringSize():Boolean
    public function set ringSize(value:Boolean):void
selectedSerieproperty 
selectedSerie:Number  [read-write]

SelectedSerie get the index of the serie when clicking on an item in the dataGrid

Implementation
    public function get selectedSerie():Number
    public function set selectedSerie(value:Number):void
selectedWedgeproperty 
selectedWedge:String  [read-write]

Ensure the interconnexion between the ringChart and other components in fact when clicking on a data on the grid the SelectedWedge property will get the name of the wedge and the applying a filter on it.

Implementation
    public function get selectedWedge():String
    public function set selectedWedge(value:String):void
seriesLegendproperty 
seriesLegend:RingLegend  [read-write]

A legend containing the list of the RingChart series.

Implementation
    public function get seriesLegend():RingLegend
    public function set seriesLegend(value:RingLegend):void
transitionAspectproperty 
transitionAspect:String  [read-write]

this porperty is used to define the effect aspect when exploding a wedge

The default value is linear.

Implementation
    public function get transitionAspect():String
    public function set transitionAspect(value:String):void
tweenerArrayproperty 
public var tweenerArray:Array
typesDescriptorproperty 
typesDescriptor:Dictionary  [read-write]

Column types descriptor. This Object specifies the Class needed to parse the content of a column fields. By default, the Ring Chart component recognize Data Types of columns content (String, Number, Date....). But in some cases, we need to specify some columns types to the RingChart. The solution is to specify the Type of the column fields where bypassing the automatic type assignment is needed. The Types Descripor is a Dictionary that allows to assign a Type Class to a given column data and thus giving the RingChart integrator the possibility to correctly describe the content of his data source columns.

The default value is null;.

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

Implementation
    public function get typesDescriptor():Dictionary
    public function set typesDescriptor(value:Dictionary):void

Example
var typesDescriptor:Dictionary= new Dictionary(); typesDescriptor["Age"]=String; typesDescriptor["BirthDay"]=Date; myRingChart.typesDescriptor=typesDescriptor;

viewLabelproperty 
viewLabel:Boolean  [read-write]

show the labels in a callout way: in fact when this labelShow is set the labels will be displayet on the outer ring in a callout way.

The default value is true.

Implementation
    public function get viewLabel():Boolean
    public function set viewLabel(value:Boolean):void
viewPercentageproperty 
viewPercentage:Boolean  [read-write]

This property is used to show the percentage on the ringChart: when this property is set to true, the percentage values will be displayed on the different rings.

The default value is true.

Implementation
    public function get viewPercentage():Boolean
    public function set viewPercentage(value:Boolean):void
viewTooltipsproperty 
viewTooltips:Boolean  [read-write]

this property should be set to True when the user want to show the toolTip in each wedge

Implementation
    public function get viewTooltips():Boolean
    public function set viewTooltips(value:Boolean):void
withHeadersproperty 
withHeaders:Boolean  [read-write]

Indicator if CSV file first row are headers or not.

The default value is true.

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

Implementation
    public function get withHeaders():Boolean
    public function set withHeaders(value:Boolean):void
Constructor detail
RingChart()constructor
public function RingChart()

Creates a new RingChart instance.

Method detail
updateDisplayList()method
protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):voidParameters
unscaledWidth:Number
 
unscaledHeight:Number
Event detail
wedgeClickevent 
Event object type: fr.kapit.ringchart.events.RingEvent

Constant detail
COLOR_POLICY_BICHROMATICconstant
public static const COLOR_POLICY_BICHROMATIC:String = "bichromatic"

Colors are generated by mixing firstColor and secondColor.

COLOR_POLICY_MONOCHROMATICconstant 
public static const COLOR_POLICY_MONOCHROMATIC:String = "monochromatic"

Colors are generated by mixing firstColor and black.

COLOR_POLICY_SPECTRUMconstant 
public static const COLOR_POLICY_SPECTRUM:String = "spectrum"

Colors are generated by mixing red, green and blue colors.

DEG_TO_RADconstant 
public static const DEG_TO_RAD:Number = 0.017453292519943295