All Flexmonster’s configurations, such as data source, filters, and formatting, are stored in a report. You can create multiple reports with different configurations. Every report is described by the ReportObject.
Flexmonster also supports saving and restoring the report.
To see ready-to-use examples of configuring the report, visit our Examples page.
The simplest report consists of the DataSourceObject. Complete the following steps to create a report:
Step 1. Embed Flexmonster into your project.
If Flexmonster is not yet embedded, set up an empty component in your webpage:
Complete the Integrating Flexmonster guide. Your code should look similar to the following example:
const pivot = new Flexmonster({
container: "pivotContainer",
toolbar: true
});
Complete the Integration with React guide. Your code should look similar to the following example:
<FlexmonsterReact.Pivot
toolbar={true}
/>
Complete the Integration with Angular guide. Your code should look similar to the following example:
<fm-pivot [toolbar]="true"> </fm-pivot>
Complete the Integration with Vue guide. Your code should look similar to the following example:
<Pivot toolbar />
Step 2. Specify the report.dataSource property:
const pivot = new Flexmonster({
container: "pivotContainer",
componentFolder: "https://cdn.flexmonster.com/",
toolbar: true,
report: {
dataSource: {
data: getData()
}
}
});
function getData() {
return [
{
"Color" : "green",
"Country" : "Canada",
"State" : "Ontario",
"City" : "Toronto",
"Price" : 174,
"Quantity" : 22
},
{
"Color" : "red",
"Country" : "USA",
"State" : "California",
"City" : "Los Angeles",
"Price" : 166,
"Quantity" : 19
},
// Other data
]
}In this example, we connected to inline JSON data. To connect to your data source, check out the Supported data sources guide.
Step 3. Open the webpage where Flexmonster is embedded to see the created report Live example.
If you are using data or localization with non-Latin characters, ensure you have set UTF-8 encoding for your data and page. This is required to display the data correctly in the component.
Check out the full list of our report guides to see what else you can configure in the component.
Can't find your answer?
Visit the FAQ
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 licenses for internal corporate use, SaaS products, and OEM distribution. Pricing varies by license and plan. 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.