The simplest report

Configuring the report

by Flexmonster Pivot Table

HTML

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

<div id="pivotContainer"></div>

CSS

@import url(https://cdn.flexmonster.com/assets/jsfiddle-styles.css);

JavaScript

const pivot = new Flexmonster({
  container: "pivotContainer",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  report: {
    dataSource: {
      data: getData()
    }
  }
});

function getData() {
  return [
    {
      "Color" : "green",
      "Country" : "Canada",
      "State" : "Ontario",
      "City" : "Toronto",
      "Price" : 174,
      "Quantity" : 22
    },
    {
      "Color" : "red",
      "Country" : "USA",
      "State" : "California",
      "City" : "Los Angeles",
      "Price" : 166,
      "Quantity" : 19
    },
    {
      "Color" : "blue",
      "Country" : "USA",
      "State" : "Florida",
      "City" : "Tallahassee",
      "Price" : 215,
      "Quantity" : 25
    },
    {
      "Color" : "black",
      "Country" : "Canada",
      "State" : "Quebec",
      "City" : "Montreal",
      "Price" : 194,
      "Quantity" : 15
    }
 	]
}