i have set up rows and column in slic but only one column shows up always
any defualt slice am using probably?
MY SLICE IS NOT PICKING UP AND THEN DEFUALT SLICE IS DISPLAYED I THINK>
<FlexmonsterReact.Pivot ref="pivot" toolbar = "true"
beforetoolbarcreated = {this.customizeToolbar}
componentFolder="https://cdn.flexmonster.com/2.4/"
width="100%" height="600px" report = {
{
dataSource: {
dataSourceType: "json",
data : this.getJsonData()
},
slice: {
rows: [{ uniqueName: "storeNumber"},
{ uniqueName: "deptNumber"},
{ uniqueName: "catgDescription"},
{ uniqueName: "itemDescription" },
{ uniqueName: "itemNumber"}],
measures: [{ uniqueName: "qty"},
{ uniqueName: "unitRtl"},
{ uniqueName: "extRtl"}
],
},
please find teh attachment. in dev tool , i do see my slice getting rendered and somehow always one column is showed up.
i tried seeting defualtSlceoption as false ,then i get error nothing to display.
its after using ref= pivot for update, i am unable to get my slices on screen
this is pretty urgent as am needing to demo to my cleint. so kindly help in fxing slice and makin it work via my program
Hello Sabby,
Valid slice should contain all of the following properties: rows
, columns
, measures
.
Otherwise, default slice will be applied.
Please try the following:
slice: {
rows: [
{ uniqueName: "storeNumber" },
{ uniqueName: "deptNumber" },
{ uniqueName: "catgDescription" },
{ uniqueName: "itemDescription" },
{ uniqueName: "itemNumber" }
],
columns: [
{ uniqueName: "[Measures]" }
]
measures: [
{ uniqueName: "qty" },
{ uniqueName: "unitRtl" },
{ uniqueName: "extRtl" }
],
}
Regards,
Ian
didnt work
any idea? its urgent
attaching new screenshot and tag i have added
<FlexmonsterReact.Pivot ref="pivot" toolbar = "true"
// beforetoolbarcreated = {this.customizeToolbar}
componentFolder="https://cdn.flexmonster.com/2.4/"
width="100%" height="600px"
report = {
{dataSource: {
// data: jsonData,
data : this.getJsonData(),
dataSourceType: "json"
},
slice:
{ rows: [
{ uniqueName: "storeNumber" },
{ uniqueName: "deptNumber" },
{ uniqueName: "catgDescription" },
{ uniqueName: "itemDescription" },
{ uniqueName: "itemNumber" }
],
columns: [
{ uniqueName: "qty" }
],
measures: [
{ uniqueName: "unitRtl" },
{ uniqueName: "extRtl" }
]
},
options: {
viewType: "grid"
}
}
} />
</div>
is there any other way to add slice?
am looking at below example, so in update data i suppose slice wont work ?
http://jsfiddle.net/flexmonster/xf5rn80j/
Hello Sabby,
Thank you for your questions. To set the slice you need, you can try the following approach:
1. Load your data to the component.
2. Use Field List to define a slice
– fields that go to rows, go to columns and go to measures. Field List can be accessed by clicking the diagonal arrow in the upper right corner of the component. Drag & drop the fields from the left part to Rows, Columns, Values or Report Filters boxes.
3. When you have all the necessary fields in the slice, use save
API call (check the example). This API call will save the report in JSON format.
4. Open saved report, copy slice
from here and paste into your application.
As about updateData()
, it allows updating data whereas the slice, all defined options, number and conditional formatting stay the same. Please check out the example: https://jsfiddle.net/flexmonster/cnd2440m/. By the way, I suggest you looking at our Examples page. There you can find a lot of useful examples.
Let me know if you have further questions.
Regards,
Tanya
sorry . tried that too. it doesnt work.
it always shows defualt slice.
options work as i set. but slice doesnt. i updated below to have one more row ,dept but it doesnt ppick.
"slice": {
"rows": [
{
"uniqueName": "catgDescription"
}
],
"columns": [
{
"uniqueName": "[Measures]"
}
],
"measures": [
{
"uniqueName": "storeNumber",
"aggregation": "sum"
}
]
},
"options": {
"viewType": "grid_charts"
}
my slice is not picked at all
i think this is almst the last problem am stuck with . can you assist?
kindly see attachment. i have rows at dept but always catedesc shows up becz its doing some defuatltslice.
is my syntax not right?
this.refs.pivot.flexmonster.updateData({ data: this.getJsonData()});
when i remove this (in react app) , i get all columns i mention in slice
this.refs.pivot.flexmonster.updateData({ data: this.getJsonData()});
i think above line is just setting data and not slice.is there any option/api to update slice? and set it again?
its after using ref= pivot for update, i am unable to get my slices on screen
then update data in pivot.
after adding 2 lines above , my slice s not getting picked
Added below code .it worked.
flexmonsterAddJSON() {
window.flexmonster.addJSON(this.getJsonData());
var slice = {
rows: [{ uniqueName: "storeNumber" },{uniqueName: "catgDescription"}],
columns: [{ uniqueName: "itemNumber" }, { uniqueName: "[Measures]" }],
measures: [{ uniqueName: "unitRtl"}]};
window.flexmonster.runQuery(slice);
}