Final Class: DataValueAttributeCube

Oracle® JavaScript Extension Toolkit (JET)
10.1.0

F37996-01

Since:
  • 1.1.0
Module:
  • ojcube

QuickNav

Description

Creates an object used to convert rowset data into grouped "cubic" data


Usage

For additional information visit:


Final classes in JET

Classes in JET are generally final and do not support subclassing. At the moment, final is not enforced. However, this will likely change in an upcoming JET release.


See:

Constructor

new DataValueAttributeCube(rowset, layout, dataValues)

Parameters:
Name Type Description
rowset Array.<Object> An array of objects containing attribute/value pairs. The entire array or collection will be read to group its attributes according to information given by layout and dataValues
layout Array.<DataValueAttributeCube.Layout> An array of objects containing two properties: axis - a number representing the number of the axis for of the levels; levels - a slowest-to-fastest varying ordered array of objects containing one or two properties: attribute - an attribute of the rowset objects or Models to assign to this axis and level, or dataValue:true to indicate that this axis and level is the position of the data values
dataValues Array.<DataValueAttributeCube.DataValue> an array of objects containing these properties: attribute - the name of an attribute in the rowset representing data; (optional) label - a display label to use for this data attribute; (optional) aggregation - the CubeAggType for this data value attribute (defaults to sum). If the type is 'CUSTOM' then a 'callback' property should be specified which is a function to call with each value. The function takes two arguments, the first being the running value for the cell being calculated, the second being the new value to be aggregated with that running value
See:

Methods

getAxes : {Array.<CubeAxis>}

Get the CubeAxis objects in this cube
Inherited From:
Returns:
an array of CubeAxis objects
Type
Array.<CubeAxis>

getLayout : {Array.<Object>}

Return the current layout used to build the cube
Inherited From:
See:
Returns:
current layout
Type
Array.<Object>

getValues(indices) : {Array.<CubeDataValue>|CubeDataValue}

Get CubeDataValues from this cube. These represent the values of the data in the "body" of the cube
Parameters:
Name Type Description
indices Array<Cube.Indices | number> an axis-ordered array of Objects or numbers. If Objects, each should contain a 'start' property (the zero based start index for the axis) and a 'count' representing the number of data values beginning at 'start' to return on this axis. This format allows the retrieval of a block of data. Passing an array of numbers alone is equivalent to passing {start:, count:1} and getting a single CubeDataValue
Inherited From:
Returns:
either an array of arrays of CubeDataValue, depending on the number of values requested in indices, or a single CubeDataValue The first subscript represents the 0th axis' values, and so on.
Type
Array.<CubeDataValue> | CubeDataValue

pivot(axisFrom, levelFrom, axisTo, levelTo, type) : {boolean}

Parameters:
Name Type Description
axisFrom number the axis from which to move a level
levelFrom number the level within axisFrom to move to axisTo/levelTo (zero is slowest/outermost)
axisTo number the axis to which to move levelFrom
levelTo number the level within axisTo to move the levelFrom level (zero is slowest/outermost)
type Cube.PivotType the type of pivot to perform
Inherited From:
Returns:
true if successful
Type
boolean

setPage(pin) : {undefined}

Set a pinned index for all axes above axis 1 ("pages")
Parameters:
Name Type Description
pin Array.<Cube.Pin> | Cube.Pin an array of objects (or a single object) containing an integer 'axis' attribute and its corresponding 'index' value (to which to pin the cube)
Inherited From:
Returns:
Type
undefined

Type Definitions

Aggregation

Properties:
Name Type
aggregation CubeAggType
value string

DataValue

Properties:
Name Type Argument
aggregation CubeAggType <optional>
attribute string
label string <optional>

Layout

Properties:
Name Type
axis number
levels Array.<DataValueAttributeCube.LayoutLevels>

LayoutLevels

Properties:
Name Type Argument
attribute string <optional>
dataValue boolean <optional>