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>

JavaScript

var pivot = new Flexmonster({
  container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  width: "100%",
  height: 430,
  toolbar: true,
  report: {
    dataSource: {
      data: getData()
    },
    "slice": {
      "rows": [{
        "uniqueName": "FLIGHT_DATE",
        "caption": "Flight Date",
        "levelName": "FLIGHT_DATE.Year"
      }],
      "columns": [{
        "uniqueName": "[Measures]"
      }],
      "measures": [{
        "uniqueName": "Price",
        "aggregation": "sum"
      }],
      "drills": {
        "rows": [{
            "tuple": [
              "flight_date.[2016]"
            ]
          },
          {
            "tuple": [
              "flight_date.[2016].[april]"
            ]
          }
        ]
      }
    }
  }
});

function getData() {
  return [{
    "FLIGHT_DATE": {
      caption: "Flight Date",
      type: "year/month/day"
    },
    "Price": {
      caption: "Price",
      type: "number"
    }
  }, {
    "FLIGHT_DATE": "2016-04-06T23:59:30",
    "Price": 1000
  }, {
    "FLIGHT_DATE": "2016-04-06T23:59:30",
    "Price": 1000
  }, {
    "FLIGHT_DATE": "2016-04-06T23:59:30",
    "Price": 1000
  }, {
    "FLIGHT_DATE": "2016-04-06T23:59:30",
    "Price": 1000
  }];
}