Init with API call $.flexmonster (version 2.3)

Embedding Flexmonster

by Flexmonster Pivot Table

HTML

<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://s3.amazonaws.com/flexmonster/2.3/flexmonster.js"></script>

<button onclick="setFormat()">Change currency symbol</button>

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

JavaScript

let pivot = $("#pivot").flexmonster({
  componentFolder: "https://s3.amazonaws.com/flexmonster/2.3/",
  width: "100%",
  height: 350,
  toolbar: true,
  report: {
    dataSource: {
      filename: "https://cdn.flexmonster.com/2.3/data/data.csv"
    }
  }
});

function setFormat() {
  var format = flexmonster.getFormat("Price", "sum");
  format.name = "PriceFormat";
  format.currencySymbol = "$";
  // format.currencySymbol = "£";
  // format.currencySymbol = "€";
  // format.currencySymbol = "¥";
  flexmonster.setFormat(format, "Price", "sum");
  flexmonster.refresh();
  console.log(format);
}