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": "[Time]",
"caption": "Time",
"levelName": "[Time].[Month]"
}
],
"columns": [
{
"uniqueName": "[Promotion Media]",
"caption": "Promotion Media"
},
{
"uniqueName": "[Measures]"
}
],
"measures": [
{
"uniqueName": "[Measures].[Profit]"
},
{
"uniqueName": "[Measures].[Customer Count]"
},
{
"uniqueName": "[Measures].[Sales Count]"
}
]
},
"options": {
"viewType": "charts",
"grid": {
"showTotals": "off",
"showGrandTotals": "off"
},
"chart": {
"type": "stacked_column",
"activeMeasure": {
"uniqueName": "[Measures].[Profit]",
"aggregation": "none"
}
}
},
}
});