API calls for switching to the grid or charts

Options

by Flexmonster Pivot Table

HTML

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

<button onclick="showGrid()">Show Grid</button>
<button onclick="showCharts()">Show Charts</button>
<button onclick="showPieChart()">Show Pie chart</button>

<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/data.csv"
    },
    options: {
      configuratorActive: false
    }
  }
});

function showGrid() {
  pivot.showGrid();
}

function showCharts() {
  pivot.showCharts();
}

function showPieChart() {
  pivot.showCharts("pie");
}