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"></div>

CSS

#fm-pivot-view .fm-grid-layout .fm-header-c {
  white-space: normal !important;
  text-overflow: initial !important;
}

#fm-pivot-view .fm-grid-column {
  max-width: 80px;
}

JavaScript

new Flexmonster({
  container: "#pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  width: "100%",
  height: 430,
  toolbar: true,
  report: {
    dataSource: {
      filename: "data/sales.csv"
    },
    slice: {
      rows: [{
        uniqueName: "Month"
      }, {
        uniqueName: "[Measures]"
      }],
      columns: [{
        uniqueName: "Category",
        levelName: "Product Name"
      }],
      measures: [{
        "uniqueName": "Revenue",
        "aggregation": "sum",
        "format": "2sfou03a"
      }]
    },
    "tableSizes": {
      "rows": [{
        "idx": 1,
        "height": 42
      }],
      "columns": [{
        "idx": 0,
        "width": 135
      }]
    }
  }
});