The classic (tabular) form is a pivot table view that gives an Excel-like layout of hierarchies. With the classic pivot table, you can show hierarchy sublevels next to one another, in separate rows or columns.
Play with the demo on a larger screen: save this link for later or watch the video review now.
const pivot = new Flexmonster({
container: "#pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
report: {
dataSource: {
type: "csv",
filename: "data/data.csv"
},
options: {
grid: {
type: "classic"
}
},
slice: {
rows: [
{
uniqueName: "Country"
},
{
uniqueName: "Business Type"
}
],
columns: [
{
uniqueName: "Color"
},
{
uniqueName: "[Measures]"
}
],
measures: [
{
uniqueName: "Price",
format: "currency"
}
],
expandAll: true
},
formats: [
{
name: "",
thousandsSeparator: ",",
decimalSeparator: ".",
decimalPlaces: 2
},
{
name: "currency",
currencySymbol: "$"
}
]
}
});
function changeLayout(layoutType) {
pivot.setOptions({
grid: {
type: layoutType
}
});
pivot.refresh();
}
function setRepeatLabels(enabled) {
pivot.setOptions({
grid: {
repeatAllLabels: enabled
}
});
pivot.refresh();
}
<button onclick="changeLayout('compact')">Use compact form</button>
<button onclick="changeLayout('classic')">Use classic form</button>
<button onclick="setRepeatLabels(true)">Repeat labels on</button>
<button onclick="setRepeatLabels(false)">Repeat labels off</button>
<div id="pivot-container"></div>
By default, grand totals are displayed at the end of each row, and subtotals are placed in a separate row at the bottom.
All the pivot table functionality works the same way: you can drag and drop, expand, collapse, drill down and up the hierarchies, sort and drill through values, and more. Just do it the way you're used to in Excel.
If multilevel hierarchies from your report contain a lot of sublevels, we recommend switching to the compact form, which shows them more neatly.
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 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.