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/2.9.87/flexmonster.js"></script>
<link href="https://cdn.flexmonster.com/2.9.87/flexmonster.css" rel="stylesheet">

<!-- <script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<link href="https://cdn.flexmonster.com/flexmonster.css" rel="stylesheet"> -->

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

JavaScript

var pivot = new Flexmonster({
  container: "#pivot-container",
  componentFolder: "https://cdn.flexmonster.com/2.9.87/",
  licenseFilePath: "https://cdn.flexmonster.com/jsfiddle.charts.key",
  toolbar: true,
  report: {
    dataSource: {
      type: "api",
      url: "https://olap.flexmonster.com:9500",
      index: "fm-product-sales",
      mapping: {
        Country: {
          filters: false,
        },
      },
    },
    slice: {
      rows: [
        {
          uniqueName: "Country",
        },
      ],
      columns: [
        {
          uniqueName: "Category",
        },
        {
          uniqueName: "[Measures]",
        },
      ],
      measures: [
        {
          uniqueName: "Price",
          aggregation: "sum",
        },
      ],
    },
    formats: [
      {
        name: "",
        maxDecimalPlaces: 2,
      },
    ],
  },
  width: "100%",
})