Drill down all multilevel hierarchies

Mapping configuration

by Flexmonster Pivot Table

HTML

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

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

CSS

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

JavaScript

let pivot = new Flexmonster({
  container: "#pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  report: {
    dataSource: {
      filename: "data/sales_data_without_types.csv",
      mapping: {
        "Region": {
          hierarchy: "Geography"
        },
        "State": {
          parent: "Region",
          hierarchy: "Geography"
        },
        "City": {
          parent: "State",
          hierarchy: "Geography"
        }
      }
    },
    slice: {
      rows: [
        {
          uniqueName: "Geography"
        }
      ],
      columns: [
        {
          uniqueName: "Category"
        },
        {
          uniqueName: "[Measures]"
        }
      ],
      measures: [
        {
          uniqueName: "Revenue",
          aggregation: "sum"
        }
      ],
      expands: {
        expandAll: true
      },
      drills: {
        drillAll: true
      }
    }
  }
});