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>
<button onclick="update()">update</button>

<div id="pivot-container"></div>

JavaScript

var pivot = new Flexmonster({
  container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  width: "100%",
  height: 300,
  toolbar: true,
  report: {
    "dataSource": {
      "data": getData(),
      "mapping": {
        "ScenarioName": {
          "type": "string"
        },
        "Actual-1": {
          "type": "number"
        },
        "Year": {
          "type": "number"
        },
        "YearSelectionId885cf19e-20b6-4511-aab4-f8ada4548bcb": {
          "type": "property",
          "hierarchy": "Year"
        },
        "month": {
          "type": "number"
        },
        "monthSelectionId885cf19e-20b6-4511-aab4-f8ada4548bcb": {
          "type": "property",
          "hierarchy": "month"
        },
        "Org_key_name": {
          "type": "string"
        },
        "Firstlevel": {
          "type": "string"
        },
        "FirstlevelSelectionId885cf19e-20b6-4511-aab4-f8ada4548bcb": {
          "type": "property",
          "hierarchy": "Firstlevel"
        },
        "SecondLevel": {
          "type": "string"
        },
        "SecondLevelSelectionId885cf19e-20b6-4511-aab4-f8ada4548bcb": {
          "type": "property",
          "hierarchy": "SecondLevel"
        },
        "Child_desc": {
          "type": "string"
        },
        "Child_descSelectionId885cf19e-20b6-4511-aab4-f8ada4548bcb": {
          "type": "property",
          "hierarchy": "Child_desc"
        },
        "Actual": {
          "type": "number"
        },
        "Amount": {
          "type": "number"
        },
        "RowId": {
          "type": "id"
        }
      }
    },
    "options": {
      "grid": {
        "type": "flat",
        "showFilter": false,
        "dragging": false,
        "showReportFiltersArea": false,
        "showTotals": "on",
        "showGrandTotals": "on",
        "showHeaders": false,
        "showHierarchies": true
      },
      "drillThrough": false,
      "configuratorButton": false,
     ...