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

var pivot = new Flexmonster({
  container: "pivotContainer",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  report: {
    dataSource: {
      filename: "data/data.csv"
    }
  },
  beforetoolbarcreated: customizeToolbar
});

function customizeToolbar(toolbar) {
  FlexmonsterToolbar.prototype.showFormatCellsDialog = function(measureName) {
    var self = this;
    var Labels = this.Labels;
    var currentFormatVO = null;
    var currentMeasureName = null;

    function updateDropdowns() {
      textAlignDropDown.disabled =
        thousandsSepDropDown.disabled =
        decimalSepDropDown.disabled =
        decimalPlacesDropDown.disabled =
        currencySymbInput.disabled =
        positiveCurrencyFormat.disabled =
        negativeCurrencyFormat.disabled = negativeNumberFormat.disabled =
        nullValueInput.disabled =
        isPercentDropdown.disabled =
        (valuesDropDown.value == "empty");
    }

    var positiveCurrencyFormatConfigTemplate = {
      "$1": "$1",
      "1$": "1$"
    };

    var negativeCurrencyFormatConfigTemplate = {
      "-$1": "-$1",
      "-1$": "-1$",
      "$-1": "$-1",
      "$1-": "$1-",
      "1-$": "1-$",
      "1$-": "1$-",
      "($1)": "($1)",
      "(1$)": "(1$)"
    };

    var negativeNumberFormatTemplate = {
      "-1": "-1",
      "- 1": "- 1",
      "1-": "1-",
      "1 -": "1 -",
      "(1)": "(1)"
    };

    var textAlignTemplate = {
      "LEFT": "left",
      "CENTER": "center",
      "RIGHT": "right"
    }

    var currencySignTemplate = "$";

    var positiveCurrencyFormatConfig = {};
    var negativeCurrencyFormatConfig = {};

    function prefilterCurrencyFormatConfig(configTemplate, newConfig, currencySign) {
      for (var key in configTemplate) {
        newConfig[key] = configTemplate[key].replace(currencySignTemplate, currencySign);
      }
      return newConfig;
    }

    function filterFormatting(formatVO) {
      if (currentFormatVO["textAlign"] != textAlignDropDown.value)...