JSFiddle - React, Tailwind, and code Playground

by Flexmonster Pivot Table

HTML

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

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>


<div id="pivot-container"></div>
<div id="pivot-container-2"></div>
<h2>
Click on one of the charts to change the grid
</h2>
<div id="highcharts-container"></div>
<div id="highcharts-container-2"></div>

CSS

#pivot-container {
  z-index: 2;
}

#pivot-container-2 {
  position: absolute !important;
  top: 0px;
  z-index: 1;
}

h2 {
  font-family: "Calibri";
}

JavaScript

let pivot1 = new Flexmonster({
  container: "pivot-container",
  height: "500",
  componentFolder: "https://cdn.flexmonster.com/",
  licenseFilePath: "https://cdn.flexmonster.com/jsfiddle.charts.key",
  reportcomplete: () => {
    createChart1();
    document.getElementById('highcharts-container').addEventListener('click', () => {
      document.getElementById('pivot-container').style["z-index"] = 2;
      document.getElementById('pivot-container-2').style["z-index"] = 1;
    });
  },
  toolbar: true,
  report: {
    dataSource: {
      type: "microsoft analysis services",

      /* URL to msmdpump.dll */
      proxyUrl: "https://olap.flexmonster.com/olap/msmdpump.dll",

      /* Catalog name */
      catalog: "Adventure Works DW Standard Edition",

      /* Cube name */
      cube: "Adventure Works",
    },
    slice: {
      rows: [{
          uniqueName: "[Product].[Category]"
        },
        {
          uniqueName: "[Product].[Product]"
        }
      ],
      columns: [{
        uniqueName: "[Measures]"
      }],
      measures: [{
        uniqueName: "[Measures].[Tax Amount]"
      }]
    },
  }
});

let pivot2 = new Flexmonster({
  container: "pivot-container-2",
  componentFolder: "https://cdn.flexmonster.com/",
  licenseFilePath: "https://cdn.flexmonster.com/jsfiddle.charts.key",
  height: "500",
  reportcomplete: () => {
    createChart2();
    document.getElementById('highcharts-container-2').addEventListener('click', () => {
      document.getElementById('pivot-container').style["z-index"] = 1;
      document.getElementById('pivot-container-2').style["z-index"] = 2;
    });
  },
  toolbar: true,
  report: {
    dataSource: {
      type: "microsoft analysis services",

      /* URL to msmdpump.dll */
      proxyUrl: "https://olap.flexmonster.com/olap/msmdpump.dll",

      /* Catalog name */
      catalog: "Adventure Works DW Standard Edition",

      /* Cube name */
      cube: "Adventure Works",
    },
    slice: {
      rows: [{
       ...