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.
Play with the demo on a larger screen: save this link for later or watch the video review now.
import { useRef } from "react";
import * as FlexmonsterReact from "react-flexmonster";
import "flexmonster/flexmonster.css";
function PivotTableDemo() {
const pivotRef = useRef(null);
const report = {
dataSource: {
type: "csv",
filename: "https://cdn.flexmonster.com/data/happiness.csv",
mapping: {
"Year": {
type: "string"
}
}
},
slice: {
rows: [
{
uniqueName: "Region"
},
{
uniqueName: "Country or region"
}
],
columns: [
{
uniqueName: "[Measures]"
},
{
uniqueName: "Year"
}
],
measures: [
{
uniqueName: "Score",
aggregation: "median",
grandTotalCaption: "Average Happiness"
}
]
},
conditions: [
{
formula: "AND(#value > 7.3, #value < 10)",
format: {
backgroundColor: "#f0c63e",
color: "#000000",
fontFamily: "Arial",
fontSize: "12px"
}
},
{
formula: "AND(#value > 0, #value < 4.5)",
format: {
backgroundColor: "#f29c8d",
color: "#000000",
fontFamily: "Arial",
fontSize: "12px"
}
}
],
formats: [
{
name: "",
decimalPlaces: 2
}
]
};
const onOpenLocalCSV = () => {
pivotRef.current.flexmonster.connectTo({
type: "csv",
browseForFile: true
});
};
const onLoadRemoteCSV = () => {
let filename = prompt("Open remote CSV", "https://cdn.flexmonster.com/data/data.csv");
if (filename != null) {
pivotRef.current.flexmonster.connectTo({
type: "csv",
filename: filename
});
}
};
const onOpenLocalJSON = () => {
pivotRef.current.flexmonster.connectTo({
type: "json",
browseForFile: true
});
};
const onLoadRemoteJSON = () => {
let filename = prompt("Open remote JSON", "https://cdn.flexmonster.com/data/data.json");
if (filename != null) {
pivotRef.current.flexmonster.connectTo({
type: "json",
filename: filename
});
}
};
const customizeCellFunction = (cell, data) => {
if (data.isGrandTotalColumn) {
if (data.value < 5 && data.value >= 0) {
cell.text = data.value.toPrecision(3) + " ☹️";
} else if (data.value >= 5 && data.value < 7) {
cell.text = data.value.toPrecision(3) + " 🙂";
} else if (data.value >= 7 && data.value < 10) {
cell.text = data.value.toPrecision(3) + " 😃";
}
}
};
return (
<>
<button onClick={onOpenLocalCSV}>Open local CSV</button>
<button onClick={onLoadRemoteCSV}>Load remote CSV</button>
<button onClick={onOpenLocalJSON}>Open local JSON</button>
<button onClick={onLoadRemoteJSON}>Load remote JSON</button>
<FlexmonsterReact.Pivot
ref={pivotRef}
report={report}
customizeCell={customizeCellFunction}
/>
</>
);
}
export default PivotTableDemo;
Connect Flexmonster Pivot for React to your local, remote, or server-side generated JSON data. Once the data is loaded, you are ready to set up a new report on the React pivot table.
You can also connect to local or remote static CSV files or CSV data generated by a server-side script. Once connected to CSV, create a new analytical report.
Moreover, you can control how fields are displayed on the grid using the mapping. It also allows you to control how the reporting tool interprets the fields.
Flexmonster is optimized to load and process your data extremely fast on the client side.
But once the size of your data set reaches 100 MB or more, we recommend using Flexmonster Data Server. This server-side solution for data aggregation will boost your reporting. It takes a few minutes to set it up and jump-start reporting.
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.