JSFiddle - React, Tailwind, and code Playground

by Flexmonster Pivot Table

HTML

<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>

<div id="pivotContainer"></div>

JavaScript

var pivot = new Flexmonster({
  container: "pivotContainer",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  global: {
    localization: {
      grid: {
        blankMember: ""
      }
    }
  },
  report: {
    dataSource: {
      data: getData(),
      mapping: {
        "Date": {
          "type": "date string"
        },
        "Feasibility": {
          "type": "number"
        },
        "Forecast": {
          "type": "number"
        },
        "Actual": {
          "type": "number"
        },
        "GL Code": {
          "type": "string"
        },
        "Cost Centre": {
          "type": "string"
        },
        "Notes": {
          "type": "string"
        },
        "Comitted Costs": {
          "type": "string"
        },
        "Uncomitted Costs": {
          "type": "string"
        }
      }
    },
    "slice": {
      "rows": [{
          "uniqueName": "Cost Centre"
        },
        {
          "uniqueName": "GL Code"
        },
        {
          "uniqueName": "Notes"
        },
        {
          "uniqueName": "Comitted Costs"
        },
        {
          "uniqueName": "Uncomitted Costs"
        }
      ],
      "columns": [{
          "uniqueName": "Date"
        },
        {
          "uniqueName": "[Measures]"
        }
      ],
      "measures": [{
        "uniqueName": "Feasibility",
        "aggregation": "sum"
      }],
      "expands": {
        "expandAll": true
      },
      "drillThrough": [
        "Actual",
        "Cost Centre",
        "Date",
        "Feasibility",
        "Forecast",
        "GL Code"
      ]
    },
    "formats": [{
      "name": "",
      "thousandsSeparator": ",",
      "decimalPlaces": 2,
      "currencySymbol": "$"
    }],
    "options": {
      "grid": {
        "type": "classic",
        "showTotals": false
      }
    }
  }
});

let headerInformation = ["Notes", "Comitted Costs", "Uncomitted Costs"]

pivot.on('drillthroughopen', () => {
  let detailsHolder =...