Packagecom.flexmonster.pivot
Classpublic class FlexPivotComponent
InheritanceFlexPivotComponent Inheritance mx.flash.UIMovieClip

Flex Pivot Component.



Public Properties
 PropertyDefined By
  autoLoad : Boolean
[write-only] The autoLoad property defines whether the report will be loaded automatically after the component initialization or the report will be loaded only after the method load() call.
FlexPivotComponent
  catalog : String
[write-only] The catalog property lets you define the data source catalog name of the OLAP data source, such as Mondrian or Microsoft Analysis Services.
FlexPivotComponent
  chartTitle : String
[write-only] The chartTitle property lets you set the title for charts.
FlexPivotComponent
  chartType : String
[write-only] The chartType property lets you define the chart type.
FlexPivotComponent
  columnDecimals : Boolean
[write-only] The columnDecimals property is one of the number formatting properties and it lets you define whether the formatting should add extra zeros in end to complete number length (true) or not (false).
FlexPivotComponent
  columns : *
[write-only] The columns property lets you set the columns data into your predefined report.
FlexPivotComponent
  configUrl : String
[write-only] The configUrl property lets you define a URL of the configuration XML file.
FlexPivotComponent
  cube : String
[write-only] The cube property lets you define the cube name from the given catalog of the OLAP data source, such as Mondrian or Microsoft Analysis Services.
FlexPivotComponent
  currencySymbol : String
[write-only] The currencySymbol property is one of the number formatting properties and it lets you define the currency symbol.
FlexPivotComponent
  currencySymbolAlign : String
[write-only] The currencySymbolAlign property is one of the number formatting properties and it lets you define the currency symbol alignment.
FlexPivotComponent
  dataSourceInfo : String
[write-only] The dataSourceInfo property lets you define the service info of the OLAP data source, such as Mondrian or Microsoft Analysis Services.
FlexPivotComponent
  decimalPlaces : int
[write-only] The decimalPlaces property is one of the number formatting properties and it lets you define the number of decimal places (the number of digits following the decimal separator).
FlexPivotComponent
  decimalSeparator : String
[write-only] The decimalSeparator property is one of the number formatting properties and it lets you define the decimal separator for data cell rendering.
FlexPivotComponent
  expandAll : Boolean
[write-only] The expandAll property defines whether to expand all rows and columns in a report on not.
FlexPivotComponent
  fieldSeparator : String
[write-only] The fieldSeparator property lets you set the field separator for CSV (if your data source is CSV).
FlexPivotComponent
  filename : String
[write-only] The filename property lets you set the path to CSV data source.
FlexPivotComponent
  gridColumnCount : Number
[read-only] Returns the number of grid columns.
FlexPivotComponent
  gridRowCount : Number
[read-only] Returns the number of grid rows.
FlexPivotComponent
  licenseFilePath : String
[write-only] The licenseFilePath property lets you define the path the TXT file with the license key.
FlexPivotComponent
  maxDecimalPlaces : int
[write-only] The maxDecimalPlaces property is one of the number formatting properties and it lets you define the same as decimalPlaces, but shows no more digits, than specified and adds no extra zeros in end to complete number length.
FlexPivotComponent
  maxSymbols : int
[write-only] The maxSymbols property is one of the number formatting properties and it lets you define the maximum number of symbols in cell.
FlexPivotComponent
  measures : *
[write-only] The measures property lets you set the measures data into your predefined report.
FlexPivotComponent
  pages : *
[write-only] The pages property lets you set the pages data into your predefined report.
FlexPivotComponent
  percentZoom : Number
[write-only] Zooms Grid in percents.
FlexPivotComponent
  productKey : String
[write-only] The productKey property lets you set the license key.
FlexPivotComponent
  proxyUrl : String
[write-only] The proxyUrl property lets you define the proxy URL to the OLAP data source, such as Mondrian or Microsoft Analysis Services.
FlexPivotComponent
  report : ReportValueObject
You can create a predefined report after dynamically added data define ReportValueObject to get exact data you need after data update.
FlexPivotComponent
  rows : *
[write-only] The rows property lets you set the rows data into your predefined report.
FlexPivotComponent
  showFieldsList : Boolean
[write-only] Shows or hides Fields List.
FlexPivotComponent
  sorting : Boolean
[write-only] The sorting property lets you enable or disable the data sorting feature.
FlexPivotComponent
  styleSheetName : String
[write-only] The styleSheetName property lets you define the URL to CSS file to apply the skin.
FlexPivotComponent
  swfFilePath : String
[write-only] The swfFilePath property lets you define the path to resource files, such as assets.swf, styles, skins etc.
FlexPivotComponent
  thousandsSeparator : String
[write-only] The thousandsSeparator property is one of the number formatting properties and it lets you define the thousands separator for data cell rendering.
FlexPivotComponent
  viewType : String
[write-only] The viewType property lets you define the view type: show Pivot Grid or selected chart.
FlexPivotComponent
  zoom : Number
[write-only] Zooms Grid
FlexPivotComponent
Public Methods
 MethodDefined By
  
FlexPivotComponent constructor.
FlexPivotComponent
  
addDataArray(array:Array):void
Adds dynamically multiple data rows to the data source.
FlexPivotComponent
  
addDataRecord(object:Object):void
Adds dynamically one data record to the data source.
FlexPivotComponent
  
addDimension(uniqueName:String, caption:String):void
Adds dynamically Dimension to the data source.
FlexPivotComponent
  
addFormat(format:FormatValueObject, measureName:String):void
Sets the formatting for cells.
FlexPivotComponent
  
addHierarchy(dimensionUniqueName:String, uniqueName:String, caption:String):void
Adds dynamically Hierarchy to Dimension in the data source.
FlexPivotComponent
  
addMeasure(uniqueName:String, caption:String, aggregation:String, format:String):void
Adds dynamically Measure to the data source.
FlexPivotComponent
  
clear():void
Clears all data and views; Pivot Grid, Charts and Fields List become empty.
FlexPivotComponent
  
Clears only view, such as Pivot Grid and Charts.
FlexPivotComponent
  
Closes Fields List.
FlexPivotComponent
  
export(type:String, exportOptions:ExportOptions = null):void
Exports Grid to preferred format.
FlexPivotComponent
  
getCell(rowIdx:int, colIdx:int):PivotGridCellRenderer
Gets the cell object by row and column indexes.
FlexPivotComponent
  
getValue(rowIdx:int, colIdx:int):Number
Gets the cell value by row and column indexes.
FlexPivotComponent
  
load():void
Starts loading data to FlexPivotComponent and applying the report.
FlexPivotComponent
  
Opens Fields List.
FlexPivotComponent
  
print():void
Prints Grid via OS print manager.
FlexPivotComponent
  
saveReport(url:String, name:String = report.xml, callbackHandler:Function = null):void
Saves the report.
FlexPivotComponent
  
setActualSize(newWidth:Number, newHeight:Number):void
[override]
FlexPivotComponent
  
showCharts(type:String):void
Switches to Charts view, default chart type is "bar".
FlexPivotComponent
  
showGrid():void
Switches to Grid view.
FlexPivotComponent
Events
 Event Summary Defined By
  Dispatched when fields list is closedFlexPivotComponent
  Dispatched when a user presses and releases the main button of a pointing device over the defined grid cell.FlexPivotComponent
  Dispatched when pivot is created and is ready to receive data.FlexPivotComponent
  Dispatched when the rendering of pivot grid or chart has been finished.FlexPivotComponent
  Dispatched when data are received and updated.FlexPivotComponent
Property Detail
autoLoadproperty
autoLoad:Boolean  [write-only]

The autoLoad property defines whether the report will be loaded automatically after the component initialization or the report will be loaded only after the method load() call.

If true the data will be loaded after FlexPivotComponent initialization. If false, the data load will be started only after the method load() call.

The default value is true.


Implementation
    public function set autoLoad(value:Boolean):void

See also

catalogproperty 
catalog:String  [write-only]

The catalog property lets you define the data source catalog name of the OLAP data source, such as Mondrian or Microsoft Analysis Services.

There is no default value for this property.


Implementation
    public function set catalog(value:String):void

See also

chartTitleproperty 
chartTitle:String  [write-only]

The chartTitle property lets you set the title for charts.

The default value is "".


Implementation
    public function set chartTitle(value:String):void
chartTypeproperty 
chartType:String  [write-only]

The chartType property lets you define the chart type.

If incorrect chart type is passed, Pivot Grid will be shown.


Implementation
    public function set chartType(value:String):void

See also

columnDecimalsproperty 
columnDecimals:Boolean  [write-only]

The columnDecimals property is one of the number formatting properties and it lets you define whether the formatting should add extra zeros in end to complete number length (true) or not (false).

The default value is false.


Implementation
    public function set columnDecimals(value:Boolean):void

See also

columnsproperty 
columns:*  [write-only]

The columns property lets you set the columns data into your predefined report.


Implementation
    public function set columns(value:any):void

See also

configUrlproperty 
configUrl:String  [write-only]

The configUrl property lets you define a URL of the configuration XML file. The configUrl property is used when you set the component configuration via XML.

Note: After setting this parameter, FlexPivotComponent will ignore the previous configuration.

There is no default value for this property.


Implementation
    public function set configUrl(value:String):void

Example
         <pivot:FlexPivotComponent configUrl="config.xml" />
         
cubeproperty 
cube:String  [write-only]

The cube property lets you define the cube name from the given catalog of the OLAP data source, such as Mondrian or Microsoft Analysis Services.

There is no default value for this property.


Implementation
    public function set cube(value:String):void

See also

currencySymbolproperty 
currencySymbol:String  [write-only]

The currencySymbol property is one of the number formatting properties and it lets you define the currency symbol.

Set this parameter, if you want to format numbers as currency.

The default value is null.


Implementation
    public function set currencySymbol(value:String):void

See also

currencySymbolAlignproperty 
currencySymbolAlign:String  [write-only]

The currencySymbolAlign property is one of the number formatting properties and it lets you define the currency symbol alignment.

The default value is left.


Implementation
    public function set currencySymbolAlign(value:String):void

See also

dataSourceInfoproperty 
dataSourceInfo:String  [write-only]

The dataSourceInfo property lets you define the service info of the OLAP data source, such as Mondrian or Microsoft Analysis Services.

Contains the information, such as the instance name, required to connect to the data source.

There is no default value for this property.


Implementation
    public function set dataSourceInfo(value:String):void

See also

decimalPlacesproperty 
decimalPlaces:int  [write-only]

The decimalPlaces property is one of the number formatting properties and it lets you define the number of decimal places (the number of digits following the decimal separator).

-1 means "no formatting"

The default value is -1.


Implementation
    public function set decimalPlaces(value:int):void

See also

decimalSeparatorproperty 
decimalSeparator:String  [write-only]

The decimalSeparator property is one of the number formatting properties and it lets you define the decimal separator for data cell rendering.

The default value is ..


Implementation
    public function set decimalSeparator(value:String):void

See also

expandAllproperty 
expandAll:Boolean  [write-only]

The expandAll property defines whether to expand all rows and columns in a report on not.

The default value is false.


Implementation
    public function set expandAll(value:Boolean):void
fieldSeparatorproperty 
fieldSeparator:String  [write-only]

The fieldSeparator property lets you set the field separator for CSV (if your data source is CSV). By default, field separator is automatically defined.


Implementation
    public function set fieldSeparator(value:String):void

See also

filenameproperty 
filename:String  [write-only]

The filename property lets you set the path to CSV data source. It can be CSV file or path to the service which returns CSV.

There is no default value for this property.


Implementation
    public function set filename(value:String):void
gridColumnCountproperty 
gridColumnCount:Number  [read-only]

Returns the number of grid columns.


Implementation
    public function get gridColumnCount():Number

See also

gridRowCountproperty 
gridRowCount:Number  [read-only]

Returns the number of grid rows.


Implementation
    public function get gridRowCount():Number

See also

licenseFilePathproperty 
licenseFilePath:String  [write-only]

The licenseFilePath property lets you define the path the TXT file with the license key.

The productKey property is the alternative way to set the license key.

The default value is null.


Implementation
    public function set licenseFilePath(value:String):void

See also

maxDecimalPlacesproperty 
maxDecimalPlaces:int  [write-only]

The maxDecimalPlaces property is one of the number formatting properties and it lets you define the same as decimalPlaces, but shows no more digits, than specified and adds no extra zeros in end to complete number length.

Usually used for currency formatting. -1 means "no formatting"

The default value is -1.


Implementation
    public function set maxDecimalPlaces(value:int):void

See also

maxSymbolsproperty 
maxSymbols:int  [write-only]

The maxSymbols property is one of the number formatting properties and it lets you define the maximum number of symbols in cell.

The default value is 10.


Implementation
    public function set maxSymbols(value:int):void

See also

measuresproperty 
measures:*  [write-only]

The measures property lets you set the measures data into your predefined report.


Implementation
    public function set measures(value:any):void

See also

pagesproperty 
pages:*  [write-only]

The pages property lets you set the pages data into your predefined report.


Implementation
    public function set pages(value:any):void

See also

percentZoomproperty 
percentZoom:Number  [write-only]

Zooms Grid in percents.

Equal to zoom method, but argument is in percents.


Implementation
    public function set percentZoom(value:Number):void

See also

productKeyproperty 
productKey:String  [write-only]

The productKey property lets you set the license key.

The licenseFilePath property is the alternative way to set the license key.

The default value is null.


Implementation
    public function set productKey(value:String):void
proxyUrlproperty 
proxyUrl:String  [write-only]

The proxyUrl property lets you define the proxy URL to the OLAP data source, such as Mondrian or Microsoft Analysis Services.

There is no default value for this property.


Implementation
    public function set proxyUrl(value:String):void

See also

reportproperty 
report:ReportValueObject

You can create a predefined report after dynamically added data define ReportValueObject to get exact data you need after data update.


Implementation
    public function get report():ReportValueObject
    public function set report(value:ReportValueObject):void

See also


Example
         var reportVO:ReportValueObject = new ReportValueObject();
         reportVO.rows = ["[Country].[Country]", "[Product].[Category]"];
         reportVO.columns = ["[Product].[Color]"];
         reportVO.pages = ["[Product].[Size]"];
         reportVO.measures = ["[Measures].[Price]"];
         pivot.report = reportVO;
         pivot.load();
         
rowsproperty 
rows:*  [write-only]

The rows property lets you set the rows data into your predefined report.


Implementation
    public function set rows(value:any):void

See also

showFieldsListproperty 
showFieldsList:Boolean  [write-only]

Shows or hides Fields List.

This method can be called after the component initialization.


Implementation
    public function set showFieldsList(value:Boolean):void
sortingproperty 
sorting:Boolean  [write-only]

The sorting property lets you enable or disable the data sorting feature.

The default value is true.


Implementation
    public function set sorting(value:Boolean):void
styleSheetNameproperty 
styleSheetName:String  [write-only]

The styleSheetName property lets you define the URL to CSS file to apply the skin.

Skins and visual appearance can be controlled with easy-to-edit CSS and images.


Implementation
    public function set styleSheetName(value:String):void
swfFilePathproperty 
swfFilePath:String  [write-only]

The swfFilePath property lets you define the path to resource files, such as assets.swf, styles, skins etc.

If PivotTable.swf and assets.swf are not located in root directory, specify the path to them.

The default value is "".


Implementation
    public function set swfFilePath(value:String):void
thousandsSeparatorproperty 
thousandsSeparator:String  [write-only]

The thousandsSeparator property is one of the number formatting properties and it lets you define the thousands separator for data cell rendering.

Default value is space


Implementation
    public function set thousandsSeparator(value:String):void

See also

viewTypeproperty 
viewType:String  [write-only]

The viewType property lets you define the view type: show Pivot Grid or selected chart.

By default or incorrect parameter case, Pivot Grid will be shown.


Implementation
    public function set viewType(value:String):void

See also

zoomproperty 
zoom:Number  [write-only]

Zooms Grid


Implementation
    public function set zoom(value:Number):void

See also

Constructor Detail
FlexPivotComponent()Constructor
public function FlexPivotComponent()

FlexPivotComponent constructor.

Method Detail
addDataArray()method
public function addDataArray(array:Array):void

Adds dynamically multiple data rows to the data source.

Parameters

array:Array — data rows

addDataRecord()method 
public function addDataRecord(object:Object):void

Adds dynamically one data record to the data source.

Parameters

object:Object — Data record


Example
         var dataRecord:Object = {"[Country].[Country]": "Australia", "[Product].[Color]": "red", "[Product].[Category]": "Car", "[Measures].[Price]": 123};
         pivot.addDataRecord(dataRecord);
         
addDimension()method 
public function addDimension(uniqueName:String, caption:String):void

Adds dynamically Dimension to the data source.

Parameters

uniqueName:String — Dimension unique name
 
caption:String — Dimension caption

addFormat()method 
public function addFormat(format:FormatValueObject, measureName:String):void

Sets the formatting for cells.

You can format all cell or only concrete meusere cell, if specify measureName parameter

Parameters

format:FormatValueObject — the class style used by this component to format object
 
measureName:String — optional parameter. Specify concrete measure to format

See also

addHierarchy()method 
public function addHierarchy(dimensionUniqueName:String, uniqueName:String, caption:String):void

Adds dynamically Hierarchy to Dimension in the data source.

Parameters

dimensionUniqueName:String — Dimension unique name for adding Hierarchy. If there is no Dimension with such unique name, error is thrown.
 
uniqueName:String — Hierarchy unique name
 
caption:String — Hierarchy caption

addMeasure()method 
public function addMeasure(uniqueName:String, caption:String, aggregation:String, format:String):void

Adds dynamically Measure to the data source.

Parameters

uniqueName:String — Measure unique name
 
caption:String — Measure caption
 
aggregation:String
 
format:String

clear()method 
public function clear():void

Clears all data and views; Pivot Grid, Charts and Fields List become empty.

clearReport()method 
public function clearReport():void

Clears only view, such as Pivot Grid and Charts.

closeFieldsList()method 
public function closeFieldsList():void

Closes Fields List.

See also

export()method 
public function export(type:String, exportOptions:ExportOptions = null):void

Exports Grid to preferred format.

Parameters

type:String — export type, see possible values in appropriate class below
 
exportOptions:ExportOptions (default = null) — html template for HTML page export

See also

getCell()method 
public function getCell(rowIdx:int, colIdx:int):PivotGridCellRenderer

Gets the cell object by row and column indexes.

Parameters

rowIdx:int — Row index
 
colIdx:int — Column index

Returns
PivotGridCellRenderer — PivotGridCellRenderer object

See also

getValue()method 
public function getValue(rowIdx:int, colIdx:int):Number

Gets the cell value by row and column indexes.

Parameters

rowIdx:int — Row index
 
colIdx:int — Column index

Returns
Number — Cell value
load()method 
public function load():void

Starts loading data to FlexPivotComponent and applying the report.

Before calling this function, set proxyUrl, dataSourceInfo, catalog, cube (MS Analysis Services or Mondrian OLAP server version) or filename (CSV version). If no source or incorrent URL specified, grid takes no changes.

See also

openFieldsList()method 
public function openFieldsList():void

Opens Fields List.

See also

print()method 
public function print():void

Prints Grid via OS print manager.

saveReport()method 
public function saveReport(url:String, name:String = report.xml, callbackHandler:Function = null):void

Saves the report.

Parameters

url:String — save report url
 
name:String (default = report.xml) — optional report name
 
callbackHandler:Function (default = null) — optional callback handler

setActualSize()method 
override public function setActualSize(newWidth:Number, newHeight:Number):void

Parameters

newWidth:Number
 
newHeight:Number

showCharts()method 
public function showCharts(type:String):void

Switches to Charts view, default chart type is "bar".

Parameters

type:String

See also

showGrid()method 
public function showGrid():void

Switches to Grid view.

See also

Event Detail
fieldsListClose Event

Dispatched when fields list is closed

gridMouseClick Event  

Dispatched when a user presses and releases the main button of a pointing device over the defined grid cell.

See also

pivotCreationComplete Event  

Dispatched when pivot is created and is ready to receive data.

renderComplete Event  

Dispatched when the rendering of pivot grid or chart has been finished.

updateComplete Event  

Dispatched when data are received and updated.