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

JavaScript

let jsonTotal = [{
    "FISCAL WEEK": 5,
    "HEALTH_STATUS": "Status 1",
    "ITEM": "Item name 1",
    "DESCRIPTION": "Some description 1",
    "HEALTH_STATUS_CL": 1 // 1 stands for Good
  },
  {
    "FISCAL WEEK": 6,
    "HEALTH_STATUS": "Status 2",
    "ITEM": "Item name 2",
    "DESCRIPTION": "Some description 2",
    "HEALTH_STATUS_CL": 0 // 0 stands for Not good
  }
];

new Flexmonster({
  componentFolder: "https://cdn.flexmonster.com/",
  container: "#pivot-container",
  toolbar: false,
  report: {
    dataSource: {
      data: jsonTotal
    },
    options: {
      grid: {
        type: "flat"
      },
      configuratorActive: false,
      showAggregationLabels: false,
      showTotals: 'off',
      showGrandTotals: 'off'
    },
    conditions: [{
      formula: "sum('HEALTH_STATUS_CL') == 1",
      measure: 'HEALTH_STATUS',
      isTotal: false,
      format: {
        "backgroundColor": "#8CE092",
        "color": "#000000",
        "fontFamily": "Arial",
        "fontSize": "12px"
      }
    }],
    slice: {
      columns: [{
          uniqueName: "FISCAL WEEK"
        },
        {
          uniqueName: "HEALTH_STATUS"
        },
        {
          uniqueName: "ITEM"
        },
        {
          uniqueName: "DESCRIPTION"
        }
      ]
    }
  }
});