JSFiddle - React, Tailwind, and code Playground

HTML

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

<h3 class="text">
  Click on a value cell to see the cell's details.
</h3>
<div id="pivot-container"></div>

<div class="output" id="output">Output will appear here</div>

CSS

.output {
  width: 80%;
  height: 300px;
  margin-left: auto;
  margin-right: auto;
  padding: 20px;
  background: rgba(242, 242, 242, 1);
  font-family: Menlo, Monaco, "Courier New", Courier, monospace;
  white-space: pre;
  font-size: 16px;
  font-weight: 400;
  overflow-y: scroll;
  margin-top: 20px;
}

.text {
  padding: 10px;
}

JavaScript

var pivot = new Flexmonster({
  container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  report: {
    dataSource: {
      data: getData(),
      mapping: {
        Country: {
          type: "string",
          hierarchy: "Country"
        },
        Color: {
          type: "string",
          hierarchy: "Country",
          parent: "Country"
        },
        recordId: {
        	type: "id"
        }
      }
    },
    "slice": {
      "rows": [{
          "uniqueName": "Country"
        },
        {
          "uniqueName": "Color"
        }
      ],
      "columns": [{
      	"uniqueName": "M"
      },
      {
        "uniqueName": "[Measures]"
      }],
      "measures": [{
        "uniqueName": "Price",
        "aggregation": "sum"
      }],
      "expands": {
        "rows": [{
          "tuple": [
            "country.[canada]"
          ]
        }]
      }
    }
  }
});

pivot.on('cellclick', function(cell) {
    console.log(cell)
});



function getData() {
  return [{
    "Color": "green",
    "M": "September",
    "W": "Wed",
    "Country": "Canada",
    "State": "Ontario",
    "City": "Toronto",
    "Price": 174,
    "Quantity": 22,
    "recordId": 1
  }, {
    "Color": "red",
    "M": "March",
    "W": "Mon",
    "Time": "1000",
    "Country": "USA",
    "State": "California",
    "City": "Los Angeles",
    "Price": 1664,
    "Quantity": 19,
    "recordId": 2
  }, {
    "Color": "red",
    "M": "January",
    "W": "Mon",
    "Country": "Canada",
    "State": "Quebec",
    "City": "Montreal",
    "Price": 1190,
    "Quantity": 292
  }, {
    "Color": "green",
    "D": "04/08/2014",
    "M": "August",
    "W": "Fri",
    "Time": "1000",
    "Country": "USA",
    "State": "California",
    "City": "Los Angeles",
    "Price": 1222,
    "Quantity": 730,
    "recordId": 3
  }, {
    "Color": "white",
    "M": "March",
    "W": "Wed",
    "Country": "USA",
    "State": "California",
    "City": "Los Angeles",
  ...