Options are used to configure Flexmonster’s functionality and manage UI controls. For example, you can enable or disable filter controls, specify where to show totals, or select the component’s view type.
Options are defined in the OptionsObject and can be divided into three subgroups:
If no options are specified, Flexmonster will use the default options.
Visit our Examples page for live examples that demonstrate how to use different options.
You can set options in the following ways:
To set options in the report, configure the options property:
report: {
dataSource: {
filename: "https://cdn.flexmonster.com/data/data.csv"
},
options: {
grid: {
type: "flat",
showHeaders: false
},
chart: {
type: "pie",
},
viewType: "grid_charts"
}
}You can also set options for all reports in the GlobalObject.
You can set options using the following API calls:
setOptions(), use the refresh() API call to apply the changes:pivot.setOptions({ chart: { title: "Chart One" } });
pivot.refresh();
Live examplesetReport() API call. Example:let report = {
options: {
grid: {
type: "classic",
title: "Grid One"
}
},
slice: {
//...
},
// Other configs
}
pivot.setReport(report);
Live exampleUse the Options Toolbar tab to manage grand totals, subtotals, and the table layout at runtime:

Most Flexmonster options have a default value. Flexmonster Pivot will use the default option values if an OptionsObject or global configurations are not specified.
{
options: {
viewType: "grid",
grid: {
type: "compact",
title: "",
showFilter: true,
showHeaders: true,
showTotals: "on",
showGrandTotals: "on",
grandTotalsPosition: "top",
repeatAllLabels: false,
showHierarchies: true,
showHierarchyCaptions: true,
showReportFiltersArea: true,
dragging: true,
showAutoCalculationBar: true,
autoSwitchToCompact: true,
},
chart: {
type: "column",
title: "",
showFilter: true,
multipleMeasures: false,
oneLevel: false,
autoRange: false,
reversedAxes: false,
showLegend: true,
showLegendButton: false,
showDataLabels: false,
showAllLabels: false,
showMeasures: true,
showOneMeasureSelection: true,
showWarning: true,
position: "bottom",
activeMeasure: {},
pieDataIndex: "0",
axisShortNumberFormat: undefined
},
filter: {
allowEmptyMembersFilter: false,
weekOffset: 1,
dateFormat: "dd/MM/yyyy",
filterByDateAndTime: false,
liveSearch: true
},
configuratorActive: false,
configuratorButton: true,
showAggregations: true,
showCalculatedValuesButton: true,
showEmptyValues: false,
editing: false,
drillThrough: true,
showDrillThroughConfigurator: true,
drillThroughMaxRows: 1000,
sorting: "on",
readOnly: false,
strictDataTypes: false,
distinguishNullUndefinedEmpty: false,
defaultDateType: "date",
datePattern: "dd/MM/yyyy",
dateTimePattern: "dd/MM/yyyy HH:mm:ss",
timePattern: "HH:mm:ss",
saveAllFormats: false,
showDefaultSlice: true,
useOlapFormatting: false,
showMemberProperties: false,
showEmptyData: true,
defaultHierarchySortName: "asc",
showOutdatedDataAlert: false,
expandExecutionTimeout: 9000,
showAggregationLabels: true,
showAllFieldsDrillThrough: false,
showFieldListSearch: false,
useCaptionsInCalculatedValueEditor: false,
validateFormulas: true,
caseSensitiveMembers: false,
simplifyFieldListFolders: false,
validateReportFiles: true,
fieldListPosition: undefined,
allowBrowsersCache: false
}
}