slice not working

Resolved
Javier asked on November 8, 2017

I just downloaded the Free version and it worked when using JSON
However the slice will not work. Please see bellow... Any idea why? is it because i am using the free version not ?
 
var pivot = new Flexmonster({
licenseKey : "code",
width : "100%",
height : 800,
container : "pivotContainer",
componentFolder : "https://cdn.flexmonster.com/2.4/",
toolbar : true,
report: {
dataSource: {
dataSourceType: "json",
data: jsonData//jsonData
}
},
"slice": {
"reportFilters": [
{
"uniqueName": "created_at.Year"
},
{
"uniqueName": "created_at.Month"
},
{
"uniqueName": "transaction"
}
],
"rows": [
{
"uniqueName": "account"
}
],
"columns": [
{
"uniqueName": "division"
},
{
"uniqueName": "[Measures]"
}
],
"measures": [
{
"uniqueName": "amount",
"aggregation": "sum"
}
]
}
});

2 answers

Public
Ian Sadovy Ian Sadovy Flexmonster November 9, 2017

Hello Javier,
 
Thank you for the question.
slice object should be a part of report object, but not spearate.
Please take a look at the following code:

report: {
dataSource:
{
dataSourceType: "json",
data: jsonData //jsonData
},
"slice":
{
"reportFilters": [
{
"uniqueName": "created_at.Year"
},
{
"uniqueName": "created_at.Month"
},
{
"uniqueName": "transaction"
}],
"rows": [
{
"uniqueName": "account"
}],
"columns": [
{
"uniqueName": "division"
},
{
"uniqueName": "[Measures]"
}],
"measures": [
{
"uniqueName": "amount",
"aggregation": "sum"
}]
}
}

Please let me know if it works.
 
Regards,
Ian

Public
Javier November 9, 2017

Thank you! 

Please login or Register to Submit Answer