1) Can someone write a jsfiddle for this question. try to add a filter but it should be initially loaded. Please look at below bold text, is my syntax correct?
2) Also, is there a way disable all the aggregated function but just Average, or disable switching aggregated function (sum,count,min,max,etc..)
3) How to initial load the layout Classic Form in below code
4) viewType: 'charts' -> this initially load the graph, but can initially load line graph
.....
"Price": null,
"Quantity": 19
}];
var report = {
configuratorActive: false,
data: jsondata,
filter: [ {uniqueName: "City"} ],
rows: [{uniqueName: "Color"}],
columns: [{uniqueName: "[Measures]"}],
measures: [{uniqueName: "Price"}, {uniqueName: "Quantity"}],
formats: [{name: "", nullValue: "blank"}],
showHeaders: false
};
report.licens.....
Hello David,
Here is a jsfiddle that addresses all your questions: https://jsfiddle.net/irynakulchytska/zmqzspng/1/
1) pages: [{uniqueName: "city"}],
2) measures: [{uniqueName: "Price", aggregation: "average", availableAggregations: ["average"], active: false}, {uniqueName: "Quantity", aggregation: "average", availableAggregations: ["average"]}],
3) classicView: true,
4) chartType: "line",
More information on report object properties can be found in the documentation in getReport() API call description http://www.flexmonster.com/api/
Kind regards,
Iryna
Hi Iryna
What if I want to initially filter out say City = Toronto?
David,
Here is a jsfiddle that illustrates how to define filter for city to show only Toronto: https://jsfiddle.net/irynakulchytska/zmqzspng/2/
pages: [{ uniqueName: "city", filter: {members: ["city.[Toronto]"]} }],
Kind regards,
Iryna
Hi Iryna sorry for the trouble, i meant filtering out Toronto?
Thanks
David,
You can filter it out by adding negation: true - https://jsfiddle.net/irynakulchytska/zmqzspng/3/, as follows:
pages: [{uniqueName: "city", filter: {members: ["city.[Toronto]"], negation: true}}],
Which means that all the cities except Toronto will be shown.
Kind regards,
Iryna
Hello David and all Flexmonster users,
Please note that in version 2.3 the structure of Report Object was changed. Read about the new structure of Report Object in the documentation: http://www.flexmonster.com/api/report-object/
Have a look at the updated sample:
https://jsfiddle.net/flexmonster/rk05mjxu/
Regards,
Tanya