JSFiddle - React, Tailwind, and code Playground
by juvian
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/",
toolbar: true,
report: {
dataSource: {
type: "csv",
filename: "https://cdn.flexmonster.com/data/data.csv",
mapping: {
"Category": {
caption: "My Category",
dimensionUniqueName: "Item",
visible: false
},
"Size": {
caption: "Size"
},
"Color": {
caption: "Color",
dimensionUniqueName: "Item"
},
"Destination": {
caption: "My Destination"
},
"Business Type": {
caption: "Business Type"
},
"Country": {
caption: "My Country"
},
"Price": {
type: "number",
caption: "My Price"
},
"Quantity": {
type: "number",
caption: "My Quantity"
}
}
},
"slice": {
"rows": [
{
"uniqueName": "Category"
},
{
"uniqueName": "Color"
}
],
"columns": [
{
"uniqueName": "[Measures]"
}
],
"measures": [
{
"uniqueName": "Price",
"aggregation": "sum"
}
],
"expands": {
"rows": [
{
"tuple": [
"category.[accessories]"
]
}
]
},
"drills": {
"rows": [
{
"tuple": [
"category.[accessories]"
]
}
]
}
},
"options": {
"configuratorActive": true,
"fieldListPosition": "right"
}
},
width: "100%",
height: 700
});
pivot.