JSFiddle - React, Tailwind, and code Playground

by Flexmonster Pivot Table

HTML

<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.flexmonster.com/theme/purple/flexmonster.min.css" />


<div id="pivotContainer"></div>

CSS

:root {
  --scrollbar-width-height: 10px;
}

.fm-scroll-pane::-webkit-scrollbar {
  background: #d6cee4;
  width: var(--scrollbar-width-height);
  height: var(--scrollbar-width-height);
}

.fm-scroll-pane::-webkit-scrollbar-thumb {
  background: #aa86e9 !important;
}

.fm-scroll-pane::-webkit-scrollbar-corner {
  background: #d6cee4 !important;
}

.fm-scroll-content[style*="17px"] {
  right: var(--scrollbar-width-height) !important;
  bottom: var(--scrollbar-width-height) !important;
}

JavaScript

let pivot = new Flexmonster({
  container: "pivotContainer",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  report: {
    dataSource: {
      filename: "data/data.csv"
    },
    slice: {
      rows: [
      	{
         	uniqueName: "Category"
        },
        {
          uniqueName: "Country"
        }
      ],
      columns: [
      	{
          uniqueName: "Destination"
        },
        {
          uniqueName: "Business Type"
        },
        {
          uniqueName: "[Measures]"
        }
      ],
      measures: [
      	{
        	uniqueName: "Price",
        	aggregation: "sum"
      	}
      ],
      expands: {
        expandAll: true
      }
    }
  }
});