JSFiddle - React, Tailwind, and code Playground

by Flexmonster Pivot Table

HTML

<script src="https://cdn.flexmonster.com/flexmonster.js"></script>

<div id="pivot-container"></div>

JavaScript

let pivot = new Flexmonster({
  container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  report: {
    options: {
      showEmptyValues: true
    },
    slice: {
      rows: [{
        uniqueName: "Category"
      }, {
        uniqueName: "Subcategory"
      }, {
        uniqueName: "Name"
      }],
      measures: [{
        uniqueName: "Price",
        aggregation: "sum"
      }]
    },
    dataSource: {
      data: [{
        "Category": "Accessories",
        "Subcategory": "Rings",
        "Name": "Silver Ring",
        "Price": 1000
      }, {
        "Category": "Accessories",
        "Subcategory": "Rings",
        "Name": "Gold Ring",
        "Price": ""
      }]
    }
  }
});

pivot.expandAllData();