JSFiddle - React, Tailwind, and code Playground
by Flexmonster Pivot Table
HTML
<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<div id="pivot-container"></div>
CSS
.fm-grid-column {
width: 120px !important;
}
JavaScript
var pivot = new Flexmonster({
container: "pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
width: "100%",
height: 430,
toolbar: true,
report: {
dataSource: {
dataSourceType: "json",
data: [
{
"date":{"type":"datetime"},
"n":{"type":"number"},
"name": {"type":"string"},
"gender": {"type":"string"},
"logiciel": {"type":"string"}
},
{
"date":"2016-04-06T23:59",
"n":1,
"name": "Nom 1",
"gender": "Femal",
"logiciel": "B"
},
{
"date":"2016-04-06T23:59",
"n":1,
"name": "Nom 2",
"gender": "Femal",
"logiciel": "A"
},
{
"date":"2016-02-07T20:33",
"n":1,
"name": "Nom 3",
"gender": "male",
"logiciel": "A"
}
]
},
slice: {
columns: [{uniqueName: 'logiciel'}],
measures: [{uniqueName: 'evol'}, {uniqueName: 'n'},
{aggregation: 'max', uniqueName: 'date'}],
rows: [{uniqueName: 'name'}, {uniqueName: 'gender'}]
},
options: {
dateTimePattern : "yyyy/MM/dd HH:mm",
showAggregationLabels: false,
grid: {
viewType : "grid",
showTotals: "on",
showGrandTotals: "on"
},
}
}
});