Flexmonster - Dfine JSON types

by Ian Sadovy

HTML

<script src="https://s3.amazonaws.com/flexmonster/2.2/flexmonster.js"></script>
<div id="pivot-content"></div>

JavaScript

flexmonster.embedPivotComponent("https://s3.amazonaws.com/flexmonster/2.2/", "pivot-content", "100%", "600", {
  licenseKey: "Z53G-1T1WC3-1V1M-0L12-2M0A-1233-1I0Y-2Y2Q-1903-322S-0T2C-1I",
  configuratorActive: false,
  data: getData()
}, true);

function getData() {
  return [{
    "id": { type: "string" },
    "first_name": { type: "string" },
    "last_name": { type: "string" },
    "company_id": { type: "string" },
    "company_name": { type: "string" },
    "job_id": { type: "string" },
    "job_title": { type: "string" },
    "employee_id": { type: "string" },
    "amount": { type: "number" },
    "date": { type: "date" },
    "sale_country": { type: "string" }
  }, {
    "id": 1,
    "first_name": "Vinnie",
    "last_name": "Koelpin",
    "company_id": 4,
    "company_name": "Purdy-Mueller",
    "job_id": 8,
    "job_title": "Mechanical Door Repairer",
    "employee_id": 151,
    "amount": 286.78,
    "date": "2016-08-11 02:58:16",
    "sale_country": "Hungary"
  }, {
    "id": 2,
    "first_name": "Leanna",
    "last_name": "Pacocha",
    "company_id": 8,
    "company_name": "Luettgen Ltd",
    "job_id": 4,
    "job_title": "Crane and Tower Operator",
    "employee_id": 300,
    "amount": 669.78,
    "date": "2016-01-29 13:17:33",
    "sale_country": "Kenya"
  }];
}