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="pivot-container-1"></div>

JavaScript

var pivot_table_1 = new Flexmonster({
  container: "#pivot-container-1",
  componentFolder: "https://cdn.flexmonster.com/",
  width: "100%",
  height: 378,
  report: {
    dataSource: {
      filename: "data/dashboad-demo-data.json"
    },
    "slice": {
      "rows": [{
        "uniqueName": "Division"
      }],
      "columns": [{
          "uniqueName": "Patient Status"
        },
        {
          "uniqueName": "[Measures]"
        }
      ],
      "measures": [{
        "uniqueName": "Treatment Cost",
        "aggregation": "sum",
        "format": "currency"
      }]
    },
    "formats": [{
        "name": "currency",
        "currencySymbol": "$"
      },
      {
        "name": "",
        "decimalPlaces": 2
      }
    ],
    "tableSizes": {
      "columns": [{
          "tuple": [],
          "measure": {
            "uniqueName": "Treatment Cost",
            "aggregation": "sum"
          },
          "width": 175
        },
        {
          "tuple": [
            "patient status.[inpatient]"
          ],
          "measure": {
            "uniqueName": "Treatment Cost",
            "aggregation": "sum"
          },
          "width": 250
        },
        {
          "tuple": [
            "patient status.[outpatient]"
          ],
          "measure": {
            "uniqueName": "Treatment Cost",
            "aggregation": "sum"
          },
          "width": 185
        }
      ],
      "rows":[
      {
          "idx": 0,
          "height": 40
        },
      	{
          "idx": 1,
          "height": 40
        },
      ]
    },
  }
});