Menu
Download Free Trial
  1. Getting started
    1. Quickstart
    2. System requirements
    3. Managing license keys
    4. Updating to the latest version
    5. Typical errors
    6. Migration guide from 2.3 to 2.4
    7. Migration guide from 2.2 to 2.3
    8. Installation troubleshooting
  2. JSON data source
    1. Data types in JSON
  3. CSV data source
    1. Data types in CSV
  4. Connecting to SQL database
    1. Connecting to database with .NET
    2. Connecting to database with .NET Core
    3. Connecting to database with Java
    4. Connecting to database with PHP
  5. Connecting to Microsoft Analysis Services
    1. Getting started with Accelerator
    2. Installing Accelerator as a Windows Service
    3. Configuring username/password protection
    4. Configuring secure HTTPS connection
    5. Troubleshooting
  6. Connecting to Pentaho Mondrian
    1. Getting started with Accelerator
    2. Configuring Mondrian roles
    3. Сonfiguring username/password protection
    4. Сonfiguring secure HTTPS connection
    5. Troubleshooting
  7. Connecting to icCube
  8. Configuring report
    1. Data source
    2. Slice
    3. Options
    4. Number formatting
    5. Conditional formatting
    6. Set report to the component
    7. Get report from the component
    8. Date and time formatting
    9. Calculated values
    10. Custom sorting
  9. Integration
    1. Integration with AngularJS
    2. Integration with Angular 2
    3. Integration with Angular 4
    4. Integration with React
    5. Integration with RequireJS
    6. Integration with TypeScript
    7. Integration with ASP.NET
    8. Integration with JSP
    9. Integration with PhoneGap
  10. Integration with charts
    1. Integration with Highcharts
    2. Integration with FusionCharts
    3. Integration with Google Charts
    4. Integration with any charting library
  11. Customizing toolbar
  12. Customizing appearance
  13. Localizing component
  14. Global Object
  15. Export and print
  16. API reference - JavaScript
  17. Documentation 2.3
  18. Documentation 2.2
  19. API reference - Flex
  20. getReportFilters
Table of contents

Options

The way how Pivot Component looks can be defined within the report. Options are used to specify appearance and functionality available for customers. Default options are set for every pivot instance. Specific options can be defined in addition to default ones. Find more details in the following sections:

Options properties

With options you can define Fields List mode, enable/disable drill through, showing of default slice, sorting, editing, define grid and chart properties. Here is a list of all available properties for options:

  • viewType - String. Type of view to show: "grid" or "charts" or "grid_charts" (starting from v1.9).
  • grid – Object. Contains information about grid:
    • type - String. Selected grid type. The following grid types are supported: "compact", "classic" and "flat".
    • title - String. Title of the grid.
    • showFilter - Boolean. Indicates whether the opening columns/rows filter controls and page filter controls are visible (true) or not (false) on the grid. Default value is true.
    • showHeaders - Boolean. Indicates whether the spreadsheet headers are visible (true) or not (false).
    • fitGridlines - Boolean. Indicates whether the gridlines are shown for all cells (false) or only non-empty (true).
    • showTotals - Boolean. Indicates whether the totals are visible (true) or not (false).
    • showGrandTotals - String. Specifies how to show grand totals: in rows ("rows"), in columns ("columns"), in rows and columns ("on") or hide them ("off"). Default value is "on".
    • showHierarchies - Boolean. Specifies how to show drillable hierarchy cells on the grid: with link on the right (true) or with icon on the left (false). Default value is true.
    • showHierarchyCaptions - Boolean. Indicates whether the hierarchy captions are visible (true) or not (false) on the grid. Default value is true.
    • showReportFiltersArea (starting from v2.2) - Boolean. Indicates whether the reports filtering cells on the grid should be visible (true) or not (false). Default value is true.
    • drillthroughMaxRows (starting from v2.318) - Number. Allows setting the maximal number of rows for the MSAS Drill Through popup. Supported only via XMLA protocol. The default value is 1000.
  • chart – Object. Contains information about charts:
    • type - String. Selected chart type. The following chart types are supported: "bar", "bar_h" (Horizontal Bar), "line", "scatter", "pie", "bar_stack" and "bar_line" (starting from v1.9).
    • title - String. Title of the chart.
    • showFilter (starting from v2.2) - Boolean. Indicates whether the opening columns and rows filter controls are visible (true) or not (false) on the charts. Default value is true.
    • multipleMeasures - Boolean. Starting from v1.9. Indicates whether to show multiple measures on charts. Default value is false.
    • oneLevel - Boolean. In a case of 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 on the legend (true). Default value is false.
    • autoRange - Boolean. Indicates whether the range of values on the charts is selected automatically or not.
    • showLegendButton (starting from v2.2) - Boolean. Indicates whether the button to show/hide the legend on charts is visible. Default value is false which means that the legend is always visible, without the button that hides it.
    • showAllLabels - Boolean. Setting a value to true allows showing all the labels in Pie сhart. If the value is false it will have the same behavior as it was before. Default value is false.
    • showMeasures (starting from v2.2) - Boolean. Hides all dropdowns on the top of charts if you want to show simple chart without controls or you want to save space. Default value is true - the dropdowns are visible by default, as it was in previous versions.
    • showOneMeasureSelection - Boolean. The default value is true, which means that the visibility of the measures dropdown on charts does not depend on the amount 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.
    • showWarning - Boolean. Indicates whether the warning are shown if data is too big for charts.
    • position - String. Position of charts related to the grid. It can be "bottom", "top", "left" or "right". Default value is "bottom".
    • activeMeasure - String. Selected measure on charts view.
    • pieDataIndex - String. Selected tuple index on the Pie chart.
  • configuratorActive - Boolean. Indicates whether the Fields List is opened (true) or closed (false). The default value is false.
  • configuratorButton - Boolean. Indicates whether the Fields List toggle button is visible (true) or not (false).
  • showAggregations (starting from v2.0) - Boolean. Indicates whether the aggregation selection control is visible (true) or not (false) for measures on Fields List. Default value is true.
  • showCalculatedValuesButton (starting from v2.2) - Boolean. Controls the visibility of "Add calculated value" in Fields List. Default value is true.
  • grouping - Boolean. Indicates whether grouping is enabled. Default value is false. This feature allows customers to group chosen elements using filter window. For example, the customer has shops in different cities and wants to analyze sales information. It is possible to combine several cities in one group by geography or by the sales numbers, etc. Only for "ocsv", "csv" and "json" data source types.
  • editing (starting from v2.1) - Boolean. Indicates whether the editing feature is enabled (true) or disabled (false) on the Drill Through popup for CSV, OCSV and JSON data sources. User will be able to double-click the cell and enter new value in it if the editing feature is enabled.
  • drillThrough (starting from v2.1) - Boolean. Indicates whether the drill through feature is enabled (true) or disabled (false). User can drill through by double-clicking the cell with value. Drill through feature is available for all data sources except icCube. Default value is true.
  • showDrillThroughConfigurator - Boolean. Indicates whether the Fields List toggle button is visible in Drill Through view. Default value is true.
  • sorting (starting from v2.0) - 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 ("off" or false). Default value is "on".
  • datePattern - String. It is used to format "date string" date fields ("type":"date string" in JSON, "ds+" prefix in CSV). A default pattern string is dd/MM/yyyy.
  • dateTimePattern - String. It is used to format "datetime" date fields ("type":"datetime" in JSON, "dt+" prefix in CSV). A default pattern string is dd/MM/yyyy HH:mm:ss.
  • saveAllFormats - Boolean. If there are more than 5 formats defined, only the formats that are used for "active=true" measures will be saved in the report. In order to get saved all the formats, no matter how many of them you have and whether they are used for active measures or not, please set saveAllFormats property to true. Default value is false.
  • showDefaultSlice (starting from v2.2) - Boolean. Defines whether the component selects a default slice for the report with 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, please set this property to false. Default value is true. Only for "csv", "ocsv" and "json" data source types.
  • useOlapFormatting (optional) - 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 is false.
  • showMemberProperties - Boolean. Indicates whether the member properties for OLAP data source are available in the component (true) or not (false). Default value is false. This feature is only for "microsoft analysis services" and "mondrian" data source types.
  • showEmptyData - Boolean. By default, if you have an empty CSV data source but the header is defined the component will show your slice with empty data cells. Set the value as false - the Component will show the “Data source is empty. Please check the CSV file.” message.
  • defaultHierarchySortName (starting from v2.0) - String. Sorting type for hierarchies' members ("asc", "desc" or "unsorted"). Default value is "asc".
  • selectEmptyCells (starting from v2.3) - Boolean. Indicates whether it is possible to select cells outside of the table. Default value is true.
  • showOutdatedDataAlert - Boolean. Setting a value to true will show the warning to the user before automatic reloading of data from the cube. Default value is false which means there will be no warnings. Only for Flexmonster Accelerator.
  • showAggregationLabels - Boolean. Indicates whether aggregation labels like "Total Sum of", "Sum of", etc. are shown in the columns/rows title. Default value is true.

Default options

In case options were not defined in the report, Pivot Component will use global options, if they are defined, or defaults from the component. These options can be overridden in the report. Below is an example of default options. Please note, you have to specify only necessary options. The rest will be defined automatically by the component instance.

{
   "dataSource": {
        "filename": "http://www.flexmonster.com/download/data.csv"
    },
    "options": {
        "viewType": "grid",
        "grid": {
            "type": "compact",
            "title": "",
            "showFilter": true,
            "showHeaders": true,
            "fitGridlines": false,
            "showTotals": true,
            "showGrandTotals": "on",
            "showExtraTotalLabels": false,
            "showHierarchies": true,
            "showHierarchyCaptions": true,
            "showReportFiltersArea": true
        },
        "chart": {
            "type": "bar",
            "title": "",
            "showFilter": true,
            "multipleMeasures": false,
            "oneLevel": false,
            "autoRange": false,
            "reversedAxes": false,
            "showLegendButton": false,
            "showAllLabels": false,
            "showMeasures": true,
            "showOneMeasureSelection": true,
            "showWarning": true,
            "activeMeasure": ""
        },
        "configuratorActive": false,
        "configuratorButton": true,
        "showAggregations": true,
        "showCalculatedValuesButton": true,
        "editing": false,
        "drillThrough": true,
        "showDrillThroughConfigurator": true,
        "sorting": "on",
        "datePattern": "dd/MM/yyyy",
        "dateTimePattern": "dd/MM/yyyy HH:mm:ss",
        "saveAllFormats": false,
        "showDefaultSlice": true,
        "showEmptyData": false,
        "defaultHierarchySortName": "asc",
        "selectEmptyCells": true,
        "showOutdatedDataAlert": false
    }
}

Grid options

All grid options are combined in grid section of options object. Here you can specify just the necessary properties. This example shows how to set title and hide totals from the grid:

{
    "dataSource": {
        "filename": "http://www.flexmonster.com/download/data.csv"
    },
    "options": {
        "grid": {
            "title": "Results",
            "showTotals": false
        }
    }
}

Check out on JSFiddle.

Chart options

All chart options are combined in chart section of options object. The following example will set chart title, type and hide measure dropdowns on the top of charts. Please note, viewType is set to charts to see the result instantly:

{
    "dataSource": {
        "filename": "http://www.flexmonster.com/download/data.csv"
    },
    "options": {
        "viewType": "charts",
        "chart": {
            "type": "scatter",
            "title": "Summary chart",
            "showMeasures": false
        }
    }
}

Open the example on JSFiddle.

Change options using Toolbar

Please use Options in Toolbar to change grand totals, subtotals and table layout in run time.

options

Options via API

You can change options among with other report parts using API call setReport(). Also options can be changed separately via setOptions(). To see the current options use getOptions().