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>
JavaScript
var pivot = new Flexmonster({
container: "#pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
width: "100%",
height: 430,
toolbar: true,
report: {
dataSource: {
type: "mondrian",
/* Data Source Info */
dataSourceInfo: "MondrianFoodMart",
/* URL to Flexmonster Accelerator */
proxyUrl: "http://olap.flexmonster.com:8086",
/* Catalog name */
catalog: "FoodMart",
/* Cube name */
cube: "Sales",
binary: true,
},
"slice": {
"rows": [
{
"uniqueName": "[Product]",
"sort": "asc"
}
],
"columns": [
{
"uniqueName": "[Store]",
"sort": "asc"
},
{
"uniqueName": "[Measures]"
}
],
"measures": [
{
"uniqueName": "[Measures].[Profit]",
"aggregation": "none",
"active": true
},
{
"uniqueName": "[Measures].[Customer Count]",
"aggregation": "none",
"active": true
},
{
"uniqueName": "[Measures].[Sales Count]",
"aggregation": "none",
"active": true
}
],
"expands": {
"expandAll": false
},
"drills": {
"drillAll": false,
"rows": [
{
"tuple": [
"[Product].[Drink]"
]
},
{
"tuple": [
"[Product].[Food]"
]
}
]
}
},
"options": {
"grid": {
"showGrandTotals": "off",
"showTotals": "off"
}
}
}
});