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", "aggregations": ["average"]}},
{billDate:"2020-02-05", "type": 1},
{billDate:"2019-10-15", "type": 2},
{billDate:"2015-12-22", "type": 2},
{billDate:"2019-11-09", "type": 1}
];
var pivot = new Flexmonster({
container: "pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
toolbar: true,
report: {
dataSource: {
data: jsonData,
dataSourceType: "json"
},
slice: {
reportFilters: [],
rows: [{uniqueName:"billDate"}],
columns: [
{
uniqueName: "[Measures]"
}
],
measures: [{uniqueName:"type"}]
},
options: {
grid: {
type: 'flat'
}
}
}
});