Get Free Trial
  1. API reference
  2. Welcome
    1. Getting started
    2. Get Flexmonster
    3. Quick start
    4. System requirements
    5. Troubleshooting
    6. Managing license keys
    7. Migrating from WebDataRocks to Flexmonster
  3. Integration with frameworks
    1. Available tutorials
    2. Integration with Angular
    3. Integration with React
    4. Integration with Vue
    5. Other integrations
      1. Integration with Python
        1. Integration with Django
        2. Integration with Jupyter Notebook
      2. Integration with React Native
      3. Integration with Blazor
      4. Integration with AngularJS (v1.x)
      5. Integration with TypeScript
      6. Integration with R Shiny
      7. Integration with jQuery
      8. Integration with Ionic
      9. Integration with Electron.js
      10. Integration with Webpack
      11. Integration with RequireJS
  4. Connecting to Data Source
    1. Supported data sources
    2. JSON
      1. Connecting to JSON
      2. Connecting to JSON using Flexmonster Data Server
      3. Data types in JSON
    3. CSV
      1. Connecting to CSV
      2. Connecting to CSV using Flexmonster Data Server
      3. Data types in CSV
    4. Database
      1. Connecting to SQL databases
      2. Connecting to a MySQL database
      3. Connecting to a Microsoft SQL Server database
      4. Connecting to a PostgreSQL database
      5. Connecting to an Oracle database
    5. Flexmonster Data Server
      1. Introduction to Flexmonster Data Server
      2. Getting started with Flexmonster Data Server
      3. Flexmonster Admin Panel Guide
      4. Data sources guide
      5. Security and authorization guide
      6. The Data Server as a DLL
        1. Getting started with the Data Server as a DLL
        2. Referencing the Data Server as a DLL
        3. Implementing the API controller
        4. Implementing the server filter
        5. Implementing the custom parser
        6. DLL configurations reference
        7. The controller's methods for request handling
      7. The Data Server as a console application
        1. Installing the Data Server as a console application
        2. Configurations reference
        3. Data sources guide
        4. Security and authorization guide
      8. Troubleshooting the Data Server
    6. MongoDB
      1. Introduction to Flexmonster MongoDB Connector
      2. Getting started with the MongoDB Connector
      3. Embedding the MongoDB Connector into the server
      4. Configuring the MongoDB Connector
    7. Microsoft Analysis Services
      1. Connecting to Microsoft Analysis Services
      2. Getting started with Flexmonster Accelerator
      3. Referencing the Accelerator as a DLL
      4. Configuring the authentication process
      5. Configuring a secure HTTPS connection
      6. Troubleshooting
    8. Custom data source API
      1. Introduction to the custom data source API
      2. A quick overview of a sample Node.js server
      3. A quick overview of a sample .NET Core server
      4. Implement your own server
        1. Implementing the custom data source API server
        2. Implementing filters
        3. Supporting more aggregation functions
        4. Supporting multilevel hierarchies
        5. Returning data for the drill-through view
        6. Testing your custom data source API server
    9. Elasticsearch
      1. Connecting to Elasticsearch
      2. Configuring the mapping
    10. Pentaho Mondrian
      1. Connecting to Pentaho Mondrian
      2. Getting started with the Accelerator
      3. Configuring Mondrian roles
      4. Configuring username/password protection
      5. Configuring a secure HTTPS connection
      6. Troubleshooting
    11. Connecting to other data sources
  5. Accessibility
    1. Accessibility overview
    2. Keyboard navigation
  6. Configuring report
    1. What is a report
    2. Data source
    3. Slice
    4. Options
    5. Mapping
    6. Number formatting
    7. Conditional formatting
    8. Set the report for the component
    9. Get the report from the component
    10. Share the report
    11. Date and time formatting
    12. Configuring global options
    13. Export and print
    14. Calculated values
    15. Custom sorting
  7. Charts
    1. Available tutorials
    2. Flexmonster Pivot Charts
    3. Integration with Highcharts
    4. Integration with amCharts
    5. Integration with Google Charts
    6. Integration with FusionCharts
    7. Integration with any charting library
  8. Customizing
    1. Available tutorials
    2. Customizing the Toolbar
    3. Customizing appearance
    4. Customizing the context menu
    5. Customizing the grid
    6. Customizing the pivot charts
    7. Localizing the component
  9. Security
    1. Security in Flexmonster
    2. Security aspects of connecting to an OLAP cube
      1. Ways of connecting to an OLAP cube
      2. The data transfer process
      3. Data security
      4. Data access management
  10. Updating to the latest version
    1. Updating to the latest version
    2. Release notes
    3. Migration guide from 2.8 to 2.9
    4. Migration guide from 2.7 to 2.8
    5. Migration guide from 2.6 to 2.7
    6. Migration guide from 2.5 to 2.6
    7. Migration guide from 2.4 to 2.5
    8. Migration guide from 2.3 to 2.4
    9. Migration guide from 2.2 to 2.3
  11. Flexmonster CLI Reference
    1. Overview
    2. Troubleshooting the CLI
    3. flexmonster create
    4. flexmonster add
    5. flexmonster update
    6. flexmonster version
    7. flexmonster help
  12. Documentation for older versions
Table of contents

Options

Flexmonster’s appearance can be defined within the report. Options are used to specify the appearance and functionality available to customers. For example, you can show/hide features such as filters and sorting controls, define date patterns, or enable/disable the drill-through.

Options are defined in an options object inside the report. If no options are specified, Flexmonster will use the default options. This tutorial explains which options are available and how to use them.

Our default options are defined automatically, so you only need to define the options you want to modify. All options can be divided into three subgroups:

  1. Grid options – define the grid’s appearance and functionality.
  2. Chart options – define the chart’s appearance and functionality.
  3. General options – define the options applicable to the whole component.

Read this section to learn how to set the options. The default options section contains an example of Flexmonster’s default options.

Visit our Examples page for live examples that demonstrate how to use different options.

Grid options

All grid options are in the grid section of the options object.

Available grid options
grid.type String. The selected grid’s type. The following grid types are supported: "compact", "classic", and "flat". Default value: "compact".
grid.title String. The title of the grid. Default value: "".
grid.showFilter Boolean. Indicates whether column/row filter controls and report filter controls are visible on the grid (true) or not (false). Default value: true.
grid.showHeaders Boolean. Indicates whether the spreadsheet headers are visible (true) or not (false). Default value: true.
grid.showTotals String. Specifies where to show totals: in rows ("rows"), in columns ("columns"), in rows and columns ("on") or not at all ("off"). Default value: "on".
grid.showGrandTotals String. Specifies where to show grand totals: in rows ("rows"), in columns ("columns"), in rows and columns ("on") or not at all ("off"). Default value: "on".
grid.grandTotalsPosition String. Indicates whether the grand totals are displayed at the top of the table ("top") or at the bottom ("bottom"). Only available for the flat view. Default value: "top".
grid.showHierarchies Boolean. Specifies how to show drillable hierarchy cells on the grid: with a link on the right (true) or with an icon on the left (false). Default value: true.
grid.showHierarchyCaptions Boolean. Indicates whether the hierarchy captions are visible (true) on the grid or not (false). Default value: true.
grid.drillthroughMaxRows Number. Sets the maximum number of rows for the SSAS drill-through pop-up window. Default value: 1000.
grid.showReportFiltersArea Boolean. Indicates whether the report’s filtering cells on the grid should be visible (true) or not (false). Default value: true.
grid.dragging Boolean. Indicates whether the hierarchies on the grid can be dragged (true) or not (false). Default value: true.
grid.showAutoCalculationBar Boolean. Indicates whether the autoCalculationBar feature is turned on (true) or not (false). Default value: true.
Check out a live demo showing grid options
Chart options

All chart options are in the chart section of the options object.

Available chart options
chart.type String. The selected chart type. The following chart types are supported: "column", "bar_h", "line", "scatter", "pie", "stacked_column", and "column_line". Default value: "column".
chart.title String. The title of the chart. Default value: "".
chart.showFilter Boolean. Indicates whether column/row filter controls and report filter controls are visible on the charts (true) or not (false). Default value: true.
chart.multipleMeasures Boolean. Available from v1.9. Indicates whether to show multiple measures on charts. Default value: false.
chart.oneLevel Boolean. In a drillable chart, defines whether the chart shows all nodes on the x-axis and the legend (false) or only the lowest expanded node on the x-axis and the legend (true). Default value: false.
chart.autoRange Boolean. Indicates whether the range of values in the charts is selected automatically or not. Default value: false.
chart.reversedAxes Boolean. Reverses the columns and rows when drawing charts. Default value: false.
chart.showLegend Boolean. Indicates whether the legend for the charts is visible (true) or not (false). Default value: true.
chart.showLegendButton Boolean. Indicates whether the button to show/hide the legend for the charts is visible. When set to false, the legend is visible, without a button to hide it. Default value: false.
chart.showDataLabels Boolean. Setting this value to true allows showing labels in charts. If the value is false, the labels will be hidden. Use showAllLabels to configure the labels in a pie chart. Default value: false.
chart.showAllLabels Boolean. Setting this value to true allows showing all the labels in a pie chart. If the value is false then only the labels that can be shown without overlapping will be shown. Default value: false.
chart.showMeasures Boolean. Hides all dropdowns on the tops of the charts. This is useful if you want to show a simple chart without any controls or if you want to save space. When set to true, the dropdowns are visible. Default value: true.
chart.showOneMeasureSelection Boolean. When set to true, the measures dropdown is always visible – regardless of the number of measures in it. If the value is set to false, the measures dropdown on charts will be hidden if there is only one measure in the list and visible if there are two or more measures. Default value: true.
chart.showWarning Boolean. Indicates whether warnings are shown if the data is too big for charts. Default value: true.
chart.position String. The positions of the charts in relation to the grid. It can be "bottom", "top", "left", or "right". Default value: "bottom".
chart.activeMeasure Object. Identifies the selected measure in the charts view.
chart.activeMeasure.uniqueName String. The unique measure name. This measure must be present in the slice.measures property.
chart.activeMeasure.aggregation String. The measure aggregation type. This aggregation must be defined for the measure in the slice.measures.aggregation property.
chart.pieDataIndex String. The selected column member index. Learn more about the pie chart structure.
Indexes start from "0" (the first member of a column field). If pieDataIndex is set to a non-existing index, the default index will be used. Default value: "0".
chart.axisShortNumberFormat Boolean. Indicates whether axes labels on charts are displayed using a short number format like 10K, 10M, 10B, 10T (true) or not (false). Default value: undefined (show short format if the max value > 10M).
Check out a live demo showing chart options
General options

All the general options are in the options object.

Available general options
viewType String. The type of view to show: "grid" or "charts" or "grid_charts" (starting from v1.9). Default value: "grid".
filter Object. Filtering options:
filter.weekOffset Number. Sets the number of days to be added to the start of the week (Sunday). Used to adjust the first day of the week in the filter’s calendar. Default value: 1 (Monday is the first day of the week).
filter.dateFormat String. The date pattern to use to format dates in the filter’s date inputs. Has two possible values: "dd/MM/yyyy" and "MM/dd/yyyy". Default value: "dd/MM/yyyy".
filter.liveSearch Boolean. Indicates whether the search in the filter pop-up window is performed while the user types (true) or requires the Enter button to start searching (false). Default value: true.
configuratorActive Boolean. Indicates whether the Field List is opened (true) or closed (false) after the component is initialized. Default value: false.
configuratorButton Boolean. Indicates whether the Field List toggle button is visible (true) or not (false). Default value: true.
showAggregations Boolean. Indicates whether the aggregation selection control is visible (true) or not (false) for measures on the Field List. Default value: true.
showCalculatedValuesButton Boolean. Controls the visibility of “Add calculated value” in the Field List. Default value: true.
showEmptyValues Boolean | String. Specifies where to show members with empty values on the grid and charts: in rows ("rows"), in columns ("columns"), in rows and columns (true), or not at all (false). Only for "csv" and "json" data source types. Default value: false.
grouping Boolean. Indicates whether grouping is enabled. This feature allows customers to group chosen elements using a filter window. For example, if the customer has shops in different cities and wants to analyze sales information, it would be possible to combine several cities in one group by geography, by sales numbers, etc. Only available for "csv" and "json" data source types. Default value: false.
editing Boolean. Indicates whether the editing feature is enabled (true) or disabled (false) on the drill-through pop-up window for CSV and JSON data sources. The user will be able to double-click the cell and enter a new value into it if the editing feature is enabled. Default value: false.
drillThrough Boolean. Indicates whether the drill-through feature is enabled (true) or disabled (false). The user can drill through by double-clicking the cell with a value. Default value: true.
showDrillThroughConfigurator Boolean. Indicates whether the Field List toggle button is visible in the drill-through view. Only for "csv", "json", "api", "microsoft analysis services" (for Flexmonster Accelerator), and "elasticsearch" data source types. Default value: true.
sorting String. Indicates whether the sorting controls are visible in rows ("rows"), in columns ("columns"), in rows and columns ("on" or true) on the grid cells, or not visible at all ("off" or false). Default value: "on".
readOnly Boolean. When set to true, enables the read-only mode for the component.
In the read-only mode, you cannot interact with the report via UI (e.g., the context menu, expands, and drills are disabled). In addition, configurations of the following options are ignored: showFilter (for both grid and charts), dragging, showMeasures, configuratorButton, sorting, and drillThrough.
We also suggest hiding the Toolbar when using the read-only mode.
Default value: false.
strictDataTypes Boolean. When set to true, the component treats fields marked as a measure only as measures and does not allow using them as hierarchies. This allows increasing data analyzing speed. To mark a field as a measure, set its mapping.isMeasure property to true. Check out an example.
Only for the "json" data source type. Default value: false.
distinguishNullUndefinedEmpty Boolean. Allows distinguishing null, undefined, and empty values. When set to false, the component treats null, undefined, and empty values as the same value. When set to true, there are three different values. Default value: false.
defaultDateType String. Used to specify which data types should be applied to date fields by default ("date", "date string", "year/month/day", "year/quarter/month/day", or "datetime"). Only for "json" and "csv" data source types. Default value: "date".
datePattern String. Allows specifying how the component displays fields of the "date string" type. Only for "json", "csv", "api", and "elasticsearch" data source types. Default pattern string: "dd/MM/yyyy".
Learn more about date and time formatting.
dateTimePattern String. Allows specifying how the component displays fields of the "datetime" type. Only for "json", "csv", and "api" data source types. Default pattern string: "dd/MM/yyyy HH:mm:ss".
Learn more about date and time formatting.
timePattern String. Allows specifying how the component displays fields of the "time" type. Only for "json", "csv", and "api" data source types. Default pattern string: "HH:mm:ss".
Learn more about date and time formatting.
dateTimezoneOffset Number. Allows setting a time zone for all date fields in the dataset. The dateTimezoneOffset is a number that represents the difference in hours between the needed time zone and UTC. See an example on JSFiddle.
Besides, you can also set time zones for fields of a certain type and specific fields. These time zones will have different priorities. Learn more in our guide.
saveAllFormats Boolean. If there are more than 20 formats defined, only the formats that are used for "active: true" measures will be saved in the report. In order to save all the formats, set the saveAllFormats property to true. Default value: false.
showDefaultSlice Boolean. Defines whether the component selects a default slice for a report with an empty slice (when nothing is set in rows, columns, report filters, and measures). If true, the first hierarchy from data goes to rows and the first measure goes to columns in the default slice. To avoid this default behavior, set this property to false. Only available for "csv" and "json" data source types. Default value: true.
useOlapFormatting Boolean. Indicates whether the values from data source will be formatted according to the format defined in the cube (true) or not (false). Default value: false.
showMemberProperties Boolean. Indicates whether the member properties for an OLAP data source are available in the component (true) or not (false). This feature is only for "microsoft analysis services" and "mondrian" data source types. Default value: false.
showEmptyData Boolean. It defines the component’s behavior in case of an empty data source. Flexomontser handles the empty data in two ways:
  • when showEmptyData is set to true, the component will show an empty grid for an empty CSV/JSON file, a JSON file with an empty array, or an empty inline JSON array. For an empty CSV data source with the defined header, the component will show the slice with empty data cells.
  • when showEmptyData is set to false, the component will show a message “Data source is empty” and trigger a dataerror event for all mentioned types of the empty data source. See an example on JSFiddle.
Default value: true.
defaultHierarchySortName String. The sorting type for hierarchies’ members ("asc", "desc", or "unsorted"). Default value: "asc".
showOutdatedDataAlert Boolean. Setting this value to true will show a warning to the user before automatic reloading of data from the cube. There will be no warnings if set to false. Only for Flexmonster Accelerator. Default value: false.
expandExecutionTimeout Number. Allows specifying an execution timeout for the expandAllData() function.
The timeout is set in milliseconds (i.e., 9000 equals 9 seconds). The minimum timeout value is 9000. Note that a large execution timeout can cause an unresponsive script alert.
Default value: 9000.
showAggregationLabels Boolean. Indicates whether aggregation labels like "Total Sum of", "Sum of", etc. are shown in the column/row titles. Default value: true.
showAllFieldsDrillThrough Boolean. Indicates whether prefiltering the drill-through view columns is enabled (false) or if the drill-through view displays all the available columns (true) when using SSAS with Flexmonster Accelerator. Default value: false.
liveFiltering Boolean. Indicates whether the live filtering for hierarchies’ members is enabled (true) or disabled (false). Default value: false.
showFieldListSearch Boolean. Indicates whether the search bar in the Field List is shown (true) or hidden (false). When the search bar is hidden, it will be shown only when the number of the hierarchies exceeds 50 (or 40 for the flat form). Default value: false.
useCaptionsInCalculatedValueEditor Boolean. By default, Flexmonster uses field unique names in the calculated value editor. If useCaptionsInCalculatedValueEditor is set to true, the component will use field captions instead of unique names. Default value: false.
validateFormulas Boolean. Indicates whether validation is performed for calculated values (true) or not (false). If validation is turned on and the report contains an invalid formula, the “Wrong formula format” alert message is shown. To turn off the “Wrong formula format” alert message, set the validateFormulas property to false. Default value: true.
caseSensitiveMembers Boolean. Indicates whether the hierarchies’ members are case-sensitive (true) or not (false). Default value: false.
simplifyFieldListFolders Boolean. Indicates whether the folders containing one field should show this field in the root (true) or not (false). Only for Elasticsearch and SSAS data sources. Default value: false.
validateReportFiles Boolean. Indicates whether validation of report files is turned on (true) or turned off (false). Setting this value to false allows loading report files in the old format without an error message. Should be used in global options. Default value: true.
fieldListPosition String. Indicates whether the Field List is always shown on the right ("right") or in the pop-up window (undefined). Default value: undefined.
allowBrowsersCache Boolean. Indicates whether browsers are allowed to cache the data (true) or not (false). When allowBrowsersCache is set to false, caching is not allowed, and Flexmonster appends a unique id to the data source’s URL to ensure that the URL stays unique. The unique URL prevents the browser from loading the data from its cache, so the data is updated every time it is requested. Setting allowBrowsersCache to true allows caching, and the URL remains unmodified (check out an example). Default value: false.
Check out a live demo showing options
How to set options

Options can be set in several ways:

  1. The most convenient way to set options is to specify them in the report. Here is how a grid title can be added:
    {
    "dataSource": {
    "filename": "https://www.flexmonster.com/download/data.csv"
    },
    "options": {
    "grid": {
    "title": "Results"
    }
    }
    }
    Check out a live sample on JSFiddle.
  2. You can change options along with other report parts using API call setReport(). Options can also be changed separately via setOptions(). To see the current options use getOptions(). For example, to set the chart title:
    flexmonster.setOptions({ chart: { title: "Chart One" } });
    flexmonster.refresh();
  3. Some options can be changed using the Toolbar. Use Options in the Toolbar to change grand totals, subtotals, and the table layout at runtime.
    options

Default options

If an options object is not defined in the report, Flexmonster Pivot will use global options if they are defined, or defaults from the component. These options can be overridden in the report.

Example of default options
{
   "dataSource": {
        "filename": "https://www.flexmonster.com/download/data.csv"
    },
    "options": {
        "viewType": "grid",
        "grid": {
            "type": "compact",
            "title": "",
            "showFilter": true,
            "showHeaders": true,
            "showTotals": "on",
            "showGrandTotals": "on",
            "grandTotalsPosition": "top",
            "showExtraTotalLabels": false,
            "showHierarchies": true,
            "showHierarchyCaptions": true,
            "drillthroughMaxRows": 1000,
            "showReportFiltersArea": true,
            "dragging": true,
            "showAutoCalculationBar": true,
            "showEmptyValues": false
        },
        "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,
            "activeMeasure": {}
        },
        "filter": {
            "weekOffset": 1,
            "dateFormat": "dd/MM/yyyy",
            "liveSearch": true
        },
        "configuratorActive": false,
        "configuratorButton": true,
        "showAggregations": true,
        "showCalculatedValuesButton": true,
        "grouping": false,
        "editing": false,
        "drillThrough": true,
        "showDrillThroughConfigurator": true,
        "sorting": "on",
        "defaultDateType": "date",
        "strictDataTypes": false,
        "datePattern": "dd/MM/yyyy",
        "dateTimePattern": "dd/MM/yyyy HH:mm:ss",
        "saveAllFormats": false,
        "showDefaultSlice": true,
        "useOlapFormatting": false,
        "showMemberProperties": false,
        "showEmptyData": true,
        "defaultHierarchySortName": "asc",
        "showOutdatedDataAlert": false,
        "showAggregationLabels": true,
        "sortAlphabetically": [],
        "showAllFieldsDrillThrough": false,
        "liveFiltering": false,
        "showFieldListSearch": false,
        "validateFormulas": true,
        "caseSensitiveMembers": false,
        "simplifyFieldListFolders": false,
        "validateReportFiles": true,
        "fieldListPosition": undefined,
        "allowBrowsersCache": false
    }
}

What’s next?

You may be interested in the following articles: