API call getMembers

Slice configuration

by Flexmonster Pivot Table

HTML

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

<p>
  Click the <b>Get Members</b> button to output members of the
  <code>Category</code> field under the component using the
  <a href="https://www.flexmonster.com/api/getmembers/" target="_blank"
  >getMembers</a> method.
</p>

<button onclick="getMembers()">Get Members</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 getMembers() {
  let members = pivot.getMembers("Category");
  showOutput(JSON.stringify(members, null, 2));
}

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