createCube method
app.createCube(qHyperCubeDef, callback)
Method used to define a hyper cube and register a callback to receive the data.
Information noteA hyper cube is a 2D visualization of an N dimensions hypercube. It can contain both dimensions and measures. If some selections are applied in a hyper cube, only the selected values are displayed. A hyper cube is an inference and aggregation interface. The results from the aggregation and the inference depend on the dimensions and measures contained in the hyper cube
Parameters
Name | Type | Description |
---|---|---|
qHyperCubeDef | Object | Cube definition. |
callback | Function | Callback method. Parameter will contain a qHyperCube. |
Returns
A promise of an object model.
Tip noteFor more information regarding a promise, see http://docs.angularjs.org/api/ng.$q.
Example
app.createCube({
qDimensions : [{
qDef : {
qFieldDefs : ["FirstName"]
}
}, {
qDef : {
qFieldDefs : ["LastName"]
}
}],
qMeasures : [{
qDef : {
qDef : "1"
}
}],
qInitialDataFetch : [{
qTop : 0,
qLeft : 0,
qHeight : 20,
qWidth : 3
}]
}, function(reply) {
var str = "";
$.each(reply.qHyperCube.qDataPages[0].qMatrix, function(key, value) {
str += '<li>' + value[0].qText + ':' + value[1].qText + '</li>';
});
$('#list').html(str);
;
});
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!