☝️Small business or a startup? See if you qualify for our special offer.
+
List of all demos

Vue Pivot Table: classic (tabular) view

The classic (tabular) form of the pivot table is an Excel-like layout where hierarchies sublevel are placed next to one another in separate rows or columns.

Domain mismatchFlexmonster is used on the domain prod-flexmonster-container-service.tbvgv2m9krico.us-east-1.cs.amazonlightsail.com, which does not match the domain your license key was issued for (flexmonster.com)

Contact our team to request a key for the domain prod-flexmonster-container-service.tbvgv2m9krico.us-east-1.cs.amazonlightsail.com

You are using the following key:
Z707-XCI209-0Q203E-3I5M00-28254L-0B2Z2S-0L0T3F-1H3W3A-421F46

Current version: 2.9.102 (build 04/28/2025)

  • .vue
<template>
  <button v-on:click="changeLayout('compact')">Use compact form</button>
  <button v-on:click="changeLayout('classic')">Use classic form</button>

  <Pivot
    ref="pivot"
    componentFolder="https://cdn.flexmonster.com/"
    height="450"
    v-bind:report="report"
  />
</template>

<script>
import Pivot from "vue-flexmonster/vue3";
import "flexmonster/flexmonster.css";

export default {
  name: "PivotComponent",
  components: {
    Pivot,
  },
  data() {
    return {
      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: "$",
         },
       ],
      },
    };
  },
  methods: {
    changeLayout(layoutType) {
      this.$refs.pivot.flexmonster.setOptions({
        grid: {
          type: layoutType,
        },
      });
      this.$refs.pivot.flexmonster.refresh();
    },
  },
};
</script>

Compared to the default compact form of the Vue pivot table, where grand totals are displayed at the end of each row and subtotals are displayed in a separate row at the bottom, the classic form shows data as the tabular layout in Excel.

The pivot functionality stays the same. It's only up to you how you want your Vue pivot grid to look.

Still, for multi-level hierarchies with many sublevels, it's better to use a compact form to show data more smartly.