Hi guys, So, I'm creating a new extension and I want the dimension and measures to be rendered into my newly created hypercube. Right now I have added the dimensions and measures statically, I want it to be rendered dynamically .The below is the code
app.createCube({
qDimensions : [{
qDef : {
qFieldDefs : ["Position"] //dimension value
}
// },
// {
// qDef : {
// qFieldDefs : ["LastName"]
// }
}],
qMeasures : [{
qDef : {
qDef : "Avg(Age)" //Measure
}
}],
qInitialDataFetch : [{
qTop : 0,
qLeft : 0,
qHeight : 20,
qWidth : 20
}]
}, function(reply,app) {
console.log(layout,app);
var data = [];
$.each(reply.qHyperCube.qDataPages[0].qMatrix, function(index, value){
if(!this[0].qIsEmpty){
data.push(this[0].qText);
}
// console.log(data)
})
})
Thank you guys in advance.