API call getAllHierarchies

Slice configuration

by Flexmonster Pivot Table

HTML

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

<p>
  Click the <b>Get All Fields</b> button to output all fields under the
  component using the
  <a href="https://www.flexmonster.com/api/getallhierarchies/" target="_blank"
  >getAllHierarchies</a> method.
</p>

<button onclick="getAllHierarchies()">Get All Fields</button>

<div id="pivot-container">The component will appear here</div>

<div class="output" id="output">Output will appear here</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/",
  height: 260,
  report: {
    dataSource: {
      filename: "data/data.csv"
    }
  }
});

function getAllHierarchies() {
  let allHierarchies = pivot.getAllHierarchies();
  showOutput(JSON.stringify(allHierarchies, null, 2));
}

function showOutput(content) {
  document.getElementById("output").innerText = content;
}