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="pivotContainer"></div>

JavaScript

const pivot = new Flexmonster({
  container: "pivotContainer",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  height: 530,
  //customizeAPIRequest: customizeAPIRequestFunction,
  //cellclick: onCellClick,
  //customizeCell: customizeCellFunction,
  //beforetoolbarcreated: customizeToolbar,
  global: {
    localization: "https://cdn.flexmonster.com/loc/pt.json"
  },
  report: {
    dataSource: {
      type: "api",
      url: "https://olap.flexmonster.com:9500",
      index: "fm-product-sales",
      concurrentRequests: true,
      mapping: {
        "Category": {
          type: "string",
          hierarchy: "Item"
        },
        "Color": {
          type: "string",
          hierarchy: "Item",
          parent: "Category"
        }
      }
    },
    localization: {
      "fieldsList": {
        "values": "Medidas"
      }
    },
    slice: {
      rows: [{
        uniqueName: "Item"
      }],
      columns: [{
        uniqueName: "[Measures]"
      }],
      measures: [{
        uniqueName: "Price",
        aggregation: "sum"
      }],
      drills: {
        rows: [{
          tuple: [
            "item.[accessories]"
          ]
        }]
      }
    },
    formats: [{
      name: "",
      thousandsSeparator: ".",
      decimalSeparator: ",",
      decimalPlaces: 2,
      maxDecimalPlaces: 2,
      maxSymbols: 20,
      negativeNumberFormat: "-1",
      currencySymbol: "",
      negativeCurrencyFormat: "-$1",
      positiveCurrencyFormat: "$1",
      isPercent: false,
      nullValue: "",
      infinityValue: "Infinity",
      divideByZeroValue: "Infinity",
      textAlign: "right",
      beautifyFloatingPoint: true
    }],
    options: {
      grid: {
        //title: "FPAP-FidenTech Planning Application Platform",
        showHeaders: false,
        //grandTotalsPosition: "top",
        //type: "classic",
        showGrandTotals: "off",
        showHierarchies: false,
        showHierarchyCaptions: true,
        //tem que...