Flexmonster Software License Agreement (“Agreement”) has been revised and is effective as of October 15, 2026.
The following modifications were made:
Downloading, installing, and/or continuing to use Flexmonster Software after October 15, 2026, constitutes Licensee’s acceptance of the terms and conditions of the modified version of Agreement. If Licensee does not agree to any of these terms and conditions, they must cease using Flexmonster Software and must not download, install, use, access, or continue to access Flexmonster Software. By continuing to use Flexmonster Software or renewing the license or maintenance after the effective date of these modifications to Agreement, Licensee accepts and agrees to be bound by the terms and conditions of the modified Agreement.
The mapping defines how fields from the data source are treated and presented within the component.
The mapping is described by the MappingObject, where each key is the field’s unique name, and a value is the FieldMappingObject. The FieldMappingObject contains properties that will be applied to the field.
To see different examples of using the mapping, visit our Examples page.
You can define the mapping for all data sources but with some differences:
See the full list of available MappingObject properties.
You can define the mapping in the following ways:
The mapping can be defined as an inline MappingObject in the following way:
report: {
dataSource: {
filename: "data.csv",
mapping: {
"Month": {
type: "month"
},
"Company Name": {
type: "string"
},
"Region": {
type: "string",
hierarchy: "Geography"
},
// ...
}
}
}To define the mapping as a URL to a file, do the following:
Step 1. Create a new JSON file with the mapping (e.g., mapping.json). Your code should look similar to the following example:
{
"Month": {
"type": "month"
},
"Company Name": {
"type": "string"
},
"Region": {
"type": "string",
"hierarchy": "Geography"
},
// ...
}Step 2. Put your mapping file where Flexmonster can access it.
Step 3. In the report, define the mapping as a URL to your file:
report: {
dataSource: {
filename: "data.csv",
mapping: "<URL_to_your_mapping_file>"
}
}By default, a caption is a field’s uniqueName. To specify the field’s custom caption, use the [field_name].caption property:
report: {
dataSource: {
filename: "data.csv",
mapping: {
"item_price": {
caption: "Price"
},
// Other fields
}
}
}By default, Flexmonster autodetects the field types. You can manually specify the type of a field when working with JSON, CSV, Flexmonster Data Server, MongoDB, or the custom data source API.
To specify the field type, use the [field_name].type property:
report: {
dataSource: {
filename: "data.csv",
mapping: {
"Month": {
type: "month",
}
}
}
}Watch the video that demonstrates how a type is set for a field: Mapping in Flexmonster Pivot.
To hide a field in the component, set the [field_name].visible property to false:
report: {
dataSource: {
filename: "data.csv",
mapping: {
"Country": {
visible: false,
}
}
}
}As a result, the "Country" field will be hidden on the grid, charts, and in the Field List
Live example.
To group several fields in the Field List, use the [field_name].folder property:
report: {
dataSource: {
filename: "data.csv",
mapping: {
"Country": {
folder: "Place",
},
"State": {
folder: "Place",
},
"City": {
folder: "Place",
}
}
}
}This feature is supported for JSON, CSV, Flexmonster Data Server, MongoDB, and the custom data source API.
Note If a root folder contains only one field, this field will be shown without the folder in the Field List.
You can format date fields when working with JSON, CSV, Flexmonster Data Server, MongoDB, the custom data source API, or Elasticsearch.
To format a specific date field, use the [field_name].format property:
report: {
dataSource: {
data: [
// ...
],
mapping: {
"OrderDate": {
type: "date string",
format: "MM/dd/yyyy"
}
}
}
}Learn more about date and time formatting.
Each field has a list of available aggregations based on the field’s type. You can limit the list to aggregations you need by specifying them in the <uniqueName>.aggregations property:
report: {
dataSource: {
filename: "data/data.csv",
mapping: {
"Price": {
aggregations: ["max", "min"]
}
}
}
}By default, any field can be used as a measure. When working with the JSON data source, you can limit which fields are available as measures:
Step 1. Set the isMeasure mapping property to true for fields that should be used as measures:
mapping: {
"Price": {
type: "number",
isMeasure: true
},
"Quantity": {
type: "number",
isMeasure: true
}
}Step 2. Set the report.options.strictDataTypes property to true:
report: {
options: {
strictDataTypes: true
},
// Other configs
}As a result, only fields marked with isMeasure: true are available as measures. All other fields can be used only for rows, columns, or report filters
Live example.
In Flexmonster, you can group related fields into a multilevel hierarchy (e.g., Date: Year > Month > Day). Compared to folders or multiple fields in rows or columns, hierarchies provide greater control over data structure and display:
This feature is supported for JSON, CSV, Flexmonster Data Server, MongoDB, and the custom data source API. Note that in the custom data source API, multilevel hierarchies must be supported on the server side.
To configure multilevel hierarchies, specify the [field_name].hierarchy and [field_name].parent properties in the mapping. Here is an example of creating the "Geography" hierarchy from the "Country", "State", and "City" fields:
report: {
dataSource: {
filename: "data.json",
mapping: {
"Country": {
hierarchy: "Geography",
},
"State": {
hierarchy: "Geography",
parent: "Country"
},
"City": {
hierarchy: "Geography",
parent: "State"
}
}
}
}Watch the video that shows how to create a multilevel hierarchy: Mapping in Flexmonster Pivot.
Starting from version 2.9, you can create multiple fields from one field and use them separately in the slice. This feature is available for JSON and CSV data sources.
To create several fields from one field, specify the mapping as follows:
dataSource: {
mapping: {
"Date": [
{
type: "date",
uniqueName: "DateHierarchical",
caption: "Date (hierarchical)"
},
{
type: "date string",
uniqueName: "DateString",
caption: "Date (string)"
}
],
// ...
}
}Notice that we use an array of FieldMappingObjects as a mapping value for the "Date" field. Each FieldMappingObject describes a separate field that will be created in the component.
Each created field should have a unique value for the uniqueName property. Specify other mapping properties as usual.
After you have defined the necessary fields, include them in the slice as ordinary fields:
report: {
slice: {
rows: [
{
uniqueName: "DateString"
}
],
// ...
}
}Each field type has a list of available aggregations. Starting from version 2.8.33, you can limit the availability of aggregation functions for fields of the following types: "number", "string", "date", and "time".
To define available aggregations for a certain field type, specify an array with the aggregations in the aggregations.[field_type] property. For example:
report: {
dataSource: {
filename: "data.json",
mapping: {
aggregations: {
number: [ "sum", "average" ],
date: [ "max", "min" ],
string: [ "count", "distinctcount" ]
}
}
}
}As a result, the following aggregations will be available:
"sum" and "average"."max" and "min"."count" and "distinctcount".If a type is not listed in the aggregations property, fields of this type will have default aggregations.
When using the custom data source API, specify supported aggregations for a certain field type in the aggregations property of the response to the /fields request.
Learn more about aggregations in the custom data source API here: Configuring aggregation functions.
Can't find your answer here?
Visit the FAQ page
Flexmonster Pivot Table & Charts is a JavaScript pivot table component for adding interactive reporting and data analysis to web applications. Users can summarize, filter, sort, and explore data in pivot tables and charts, drill into results, and export reports.
Flexmonster works in plain JavaScript and TypeScript projects. It also integrates with React, Next.js, Angular, Vue, Blazor, and other technologies. See all integration options.
Flexmonster supports JSON and CSV files, SQL databases, MongoDB, Elasticsearch, and Microsoft Analysis Services (SSAS). You can also connect other data sources through your own backend. See supported data sources.
Flexmonster offers three licensing models: a Single Corporate License for internal use by one company (from $799/year), a SaaS License for embedding Flexmonster into a multi-tenant platform (from $2,499/year), and an OEM License for vendors distributing Flexmonster inside a product installed at other businesses (from $1,499/year for a 3-license bundle). Every license allows an unlimited number of developers and covers development, staging, and production environments at no extra charge.
SaaS projects can also use the free SaaS Entry license during development. Learn more on the pricing page.
Yes. Flexmonster offers a 30-day free trial that lets you evaluate all its features. No credit card is required. The trial version has a watermark.
To get started with Flexmonster, follow our integration guide.