Need a special offer?Find out if your project fits.
+

How to get the existing option configuration

Resolved
Manoranjan Gahana asked on April 14, 2017

2 answers

Public
Manoranjan Gahana April 14, 2017

var report;
var pivot = $("#pivotContainer").flexmonster({
  componentFolder:"flexmonster/",
  toolbar: true,
  report: {
  dataSource: {
      dataSourceType: "csv",
      filename: "https://cdn.flexmonster.com/2.3/data/data.csv", // Need to Give the service URL path
      fieldSeparator: ',',
      ignoreQuotedLineBreaks: false
 },
slice: {
rows: [
   { uniqueName: "Destination" },
   { uniqueName: "Category" },
   { uniqueName: "Business Type" }
],
columns: [],
measures: [{ uniqueName: "Price", aggregation: "sum", format: "currency"}],
expands: { expandAll: true }
},
options: {
 viewType:"grid",
 configuratorActive: false,
  grid: {
   type: "classic",
   showHeaders:false,
   showTotals: true,
   showGrandTotals: "on",
  }
}
},
licenseKey: "XXXXXXXXXXXXXXXXXX",
reportcomplete: function () {
   report = pivot.getReport().options;
   console.log(report);
}
});
 
 
I am using the pivot.getReport().options,but i am not getting the actual o/p
 
O/p:-
{
   grid:{
      showHeaders:false,
      type:"classic"
     }
  configuratorActive: false
}

Public
Tanya Gryshko Tanya Gryshko Flexmonster April 14, 2017

Hello Manoranjan,
Thank you for the question. We would like to inform you that the component has the default options predefined for the component. flexmonster.getReport() method saves only those options which differ from the default ones. If you would like to save the default values as well, please use flexmonster.getReport({withDefaults: true}). You are welcome to read more details about this method in our documentation. Also, you can use flexmonster.getOptions() to get all component’s options including the default ones.
Regards,
Tanya

Please login or Register to Submit Answer