JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<div id="pivot-container"></div>
JavaScript
var jsonData = [
{billDate: {type: "date string"}, "type": {"type": "number"}, "value": {"type": "number"}},
{billDate:"2020-02-05", "type": 1, "value": 1},
{billDate:"2019-10-15", "type": 2, "value": 1},
{billDate:"2015-12-22", "type": 2, "value": 1},
{billDate:"2019-11-09", "type": 1, "value": 1}
];
var pivot = new Flexmonster({
container: "pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
toolbar: true,
report: {
dataSource: {
data: jsonData,
dataSourceType: "json"
},
slice: {
reportFilters: [{uniqueName:"billDate"}],
rows: [],
columns: [
{
uniqueName: "[Measures]"
}
],
measures: [
{uniqueName:"type"},
{uniqueName:"value"}
]
}
}
});