JSFiddle - React, Tailwind, and code Playground

by Flexmonster Pivot Table

HTML

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

<button onclick="refreshGrid()">
Refresh Grid
</button>

<div id="boaContainerEng"></div>

CSS

#fm-pivot-view .fm-grid-view div.fm-cell.alter {
   color:#ff0000;
}

JavaScript

/* var isLocal = window.location.href.includes('localhost') || window.location.href.includes('127.0.0.1')

var URL = isLocal ? "http://localhost:51718/api" : "https://boapivot.azurewebsites.net/api" */

var boa_report_eng = {
  "dataSource": {
    Type: "api",
    index: "fm-product-sales",
    url: "https://olap.flexmonster.com:9500"
  },
  "options": {
    showAggregationLabels: "false",
    grid: {
      type: "flat",
      showTotals: "false",
      showGrandTotals: "false",
      grandTotalsPosition: "bottom"
    },
    defaultDateType: "date string",
    datePattern: "yyyy-MM-dd"
  },
  "tableSizes": {
    columns: [{
        idx: 0,
        width: 5
      },
      {
        idx: 1,
        width: 65
      },
      {
        idx: 2,
        width: 68
      },
      {
        idx: 3,
        width: 75
      },
      {
        idx: 4,
        width: 75
      },
      {
        idx: 5,
        width: 75
      },
      {
        idx: 6,
        width: 85
      },
      {
        idx: 7,
        width: 85
      },
      {
        idx: 9,
        width: 82
      },
      {
        idx: 10,
        width: 75
      },
      {
        idx: 11,
        width: 75
      },
      {
        idx: 12,
        width: 75
      },
      {
        idx: 13,
        width: 76
      },
      {
        idx: 14,
        width: 76
      },
      {
        idx: 15,
        width: 76
      },
      {
        idx: 16,
        width: 76
      },
      {
        idx: 17,
        width: 76
      },
      {
        idx: 18,
        width: 71
      },
      {
        idx: 19,
        width: 76
      },
      {
        idx: 20,
        width: 80
      },
      {
        idx: 21,
        width: 80
      },
      {
        idx: 22,
        width: 83
      },
      {
        idx: 23,
        width: 70
      },
      {
        idx: 24,
        width: 70
      },
      {
        idx: 25,
        width: 1
      }
    ]
  },
  slice: {
    "rows": [{
        "uniqueName": "Category"
      },
     ...