| 包 | mx.olap |
| 类 | public class OLAPAttribute |
| 继承 | OLAPAttribute OLAPHierarchy OLAPElement Proxy |
| 实现 | IOLAPAttribute |
| 语言版本: | ActionScript 3.0 |
| 产品版本: | Flex 3 |
| 运行时版本: | Flash Player 9, AIR 1.1 |
隐藏 MXML 语法
The <mx:OLAPAttribute> tag inherits all of the tag attributes
of its superclass, and adds the following tag attributes:
<mx:OLAPAttribute
Properties
dataField=""
/>
默认 MXML 属性elements
相关 API 元素
公共属性
| 属性 | 由以下参数定义 | ||
|---|---|---|---|
![]() | allMemberName : String
层次结构的所有成员的名称。 | OLAPHierarchy | |
![]() | children : IList [只读]
所有成员的子级别,作为 IOLAPMember 实例列表。 | OLAPHierarchy | |
| dataCompareFunction : Function
用户提供的回调函数,可用于在排序数据时比较数据元素。 | OLAPAttribute | ||
| dataField : String
为此 OLAPAttribute 实例提供数据的输入数据集的字段。 | OLAPAttribute | ||
| dataFunction : Function
返回该属性的实际数据的回调函数。 | OLAPAttribute | ||
![]() | defaultMember : IOLAPMember [只读]
层次结构的默认成员。 | OLAPHierarchy | |
![]() | dimension : IOLAPDimension
此元素所属的维度。 | OLAPElement | |
![]() | displayName : String
OLAP 元素的名称,可作为 String 显示。 | OLAPElement | |
| displayNameFunction : Function
返回成员元素的显示名称的回调函数。 | OLAPAttribute | ||
| hasAll : Boolean [覆盖]
因为假定属性可聚合并且所有成员都存在,所以包含 true。 | OLAPAttribute | ||
| members : IList [覆盖] [只读]
属于此层次结构的所有级别的所有成员,作为 IOLAPMember 实例列表。 | OLAPAttribute | ||
![]() | name : String [覆盖]
用户定义的此层次结构的名称。 | OLAPHierarchy | |
![]() | uniqueName : String [只读]
多维数据集中 OLAP 元素的唯一名称。 | OLAPElement | |
公共方法
| 方法 | 由以下参数定义 | ||
|---|---|---|---|
构造函数。 | OLAPAttribute | ||
![]() |
返回层次结构中具有给定名称的级别。 | OLAPHierarchy | |
![]() |
返回层次结构中具有给定名称的成员。 | OLAPHierarchy | |
![]() |
返回该元素的唯一名称。 | OLAPElement | |
属性详细信息
dataCompareFunction | 属性 |
public var dataCompareFunction:Function| 语言版本: | ActionScript 3.0 |
| 产品版本: | Flex 3 |
| 运行时版本: | Flash Player 9, AIR 1.1 |
用户提供的回调函数,可用于在排序数据时比较数据元素。默认情况下,会直接比较数据成员。
dataField | 属性 |
dataFunction | 属性 |
dataFunction:Function| 语言版本: | ActionScript 3.0 |
| 产品版本: | Flex 3 |
| 运行时版本: | Flash Player 9, AIR 1.1 |
返回该属性的实际数据的回调函数。使用此回调函数返回基于实际数据计算的数据。例如,您可以从将该月显示为数字的实际日期作为 String 返回月名称。或者可以计算值。例如,您的输入数据包含人们的年龄,如 1、4、9、10、12、15 或 20。您的回调函数可以返回包含年龄的年龄组,如 1-10 或 11-20。
回调函数的签名为:
function myDataFunction(rowData:Object, dataField:String):Object;
其中 rowData 包含输入平构数据行的数据,dataField 包含数据字段的名称。
该函数可以返回 String 或 Number。
下例返回了该平构数据中每个年龄值的年龄组:
private function ageGroupingHandler(rowData:Object, field:String):Object
{
return rowData[field] / 10;
}
实现
public function get dataFunction():Function public function set dataFunction(value:Function):voiddisplayNameFunction | 属性 |
public var displayNameFunction:Function| 语言版本: | ActionScript 3.0 |
| 产品版本: | Flex 3 |
| 运行时版本: | Flash Player 9, AIR 1.1 |
返回成员元素的显示名称的回调函数。Flex 会为添加到 OLAPAttribute 实例的每个成员调用此函数。
函数签名为:
function myDisplayNameFunction(memberName:String):String
其中 memberName 包含元素名称。
返回元素的显示名称的函数。
下例将数字组名称 1,2 或 3 等转换为显示名称“0-9”、“10-19”:
private function myDispFunction(name:String):String
{
var value:int = parseInt(name);
return String((value)0 + " - ") + String((value+1)0-1);
}
hasAll | 属性 |
members | 属性 |
构造函数详细信息
OLAPAttribute | () | 构造函数 |
public function OLAPAttribute(name:String = null, displayName:String = null)| 语言版本: | ActionScript 3.0 |
| 产品版本: | Flex 3 |
| 运行时版本: | Flash Player 9, AIR 1.1 |
构造函数。
参数name:String (default = null) — OLAPAttribute 实例的名称。使用此参数将 OLAPAttribute 实例与 OLAPLevel 实例关联起来。
| |
displayName:String (default = null) — 属性的名称,可以作为 String 显示。
|
Tue Jun 12 2018, 11:04 AM Z
显示 MXML 语法