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

/* Style for custom highlight*/
#fm-pivot-view .fm-grid-view div.fm-cell.fm-grand-total.fm-grand-total-c.fm-total-r {
  background-color: #DF3800;
  color: white;
}

JavaScript

let pivot = new Flexmonster({
  container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  report: {
    dataSource: {
      filename: "data/data.json"
    },
    slice: {
      rows: [{
          uniqueName: "Country"
        },
        {
          uniqueName: "Business Type"
        },
        {
          uniqueName: "[Measures]"
        }
      ],
      columns: [{
        uniqueName: "Color",
        filter: {
          members: ["blue", "green"]
        }
      }],
      measures: [{
        uniqueName: "Price"
      }],
      expands: {
        rows: [{
          tuple: ["country.[australia]"]
        }]
      }
    }
  }
});