1.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).

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.

configuratorMatchHeight (starting from v2.1) – Boolean. Indicates whether the Fields List will be the same height as the component (true) or it’s height will be defined by its content amount (false). Default value is 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.

editing (starting from v2.1) – Boolean. Indicates whether the editing feature is enabled (true) or disabled (false) on the Drill Through popup for CSV 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.

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, pages 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.

showEmptyData – Boolean. If you have an empty CSV data source, but the header is defined and you want the Pivot to show it so, you can set showEmptyData as true and it will show your slice with empty data cells. The default value is false – the Component shows the “Data source is empty. Please check the CSV file.” message.

selectEmptyCells (starting from v2.3) – Boolean. Indicates whether it is possible to select cells outside of the table. Default value is true.

showMemberProperties (starting from v2.1) – Boolean. Indicates whether the member properties for OLAP data source are visible (true) or not (false) on Fields List. Default value is false.

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.

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.

Chart options

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