Specifying rows in slice shows no data

Resolved
Nikita asked on November 22, 2023

I want rows to be coming from Entity ID key values, so I set it in rows inside of slice object, and the rest of the fields I put in columns in slice. But when I load the table it is empty. I don't want any aggregations for now, just to show the values themselves.
Here is the code that I have:

processdata: function (d) {
var finaldata = [];
d.data.forEach(function (row) {
var currobj = {}
d.columns.forEach(function (col) {
var itemval = row[col.key];
currobj[col.label] = scil.Utils.isNumber(itemval) ? scil.Utils.parseNumber(itemval) : itemval;
})
finaldata.push(currobj);
});
return finaldata;
},
getcols: function (d) {
var finalcols = [];
d.columns.forEach(function (col) {
if (col.key != "compoundid") {
var currcol = {};
currcol.uniqueName = col.label;
currcol.showTotals = col.type == "float" ? true : false;
finalcols.push(currcol);
}
});
return finalcols;
},
getrows: function (d) {
var entitycol = d.columns.find(function (col) { return col.key == "compoundid" });
return [{ "uniqueName": entitycol.label }];
},
...
...
me.flexpivot = new Flexmonster({
container: divid,
componentFolder: "https://cdn.flexmonster.com/",
licenseKey: "...",
toolbar: true,
report: {
dataSource: {
data: me.processdata(d)
},
slice: {
columns: me.getcols(d),
rows: me.getrows(d)
}
}
});
 

So, rows array contains just a single object: { "uniqueName": "Entity ID" }. data is an array, objects of which have Entity ID as a key among other keys that are supposed to be columns. 
I suspect maybe measures need to be specified because when I add a column to values through UI, it starts showing rows, but the thing is that I don't need any aggregation to be done at the initial view and I don't see any aggregation of type, say, None.

4 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster November 23, 2023

Hello, Nikita!
 
Thank you for reaching out to us.
 
Kindly note that Flexmonster is a pivoting tool that is intended to show the aggregated data, so Flexmonster needs at least one measure to visualize the data.
You can read more about configuring the slice in our docs: https://www.flexmonster.com/doc/slice/.
 
Hope it helps.
 
Regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster December 6, 2023

Hello, Nikita!

Hope you are doing well.

Our team is wondering if you had some time to check out our previous answer. Could you please let us know if you have any further questions?

Looking forward to hearing from you.

Kind regards,
Solomiia

Public
Nikita December 7, 2023

Dear Solomiia,
I understand this limitation of Flexmonster now and can account for that. Thank you for all your help!
Nikita

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster December 8, 2023

Hello, Nikita!

Thank you for your feedback.

Feel free to contact us in case of any other questions.

Kind regards,
Solomiia

Please login or Register to Submit Answer