Flexmonster - Connect to Flexmonster Data Server
Demos
HTML
<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<button onclick="logMeasures()">logMeasures</button>
<div id="pivot-container"></div>
JavaScript
new Flexmonster({
container: "#pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
width: "100%",
height: 550,
toolbar: true,
global: {
localization: {
fieldsList: {
/* formulasGroupName: "All" */
}
}
},
report: {
dataSource: {
filename: "https://www.flexmonster.com/fm_uploads/2021/05/sales_data_to_format.csv",
mapping: {
"Order ID": {
"type": "string",
folder: "All/Measure"
},
"Month": {
"type": "month",
folder: "All/Measure"
},
"Company Name": {
"type": "string",
folder: "All/Measure"
},
"Region": {
"type": "string",
"hierarchy": "Geography",
folder: "All/Measure"
},
"State": {
"type": "string",
"parent": "Region",
"hierarchy": "Geography",
folder: "All/Measure"
},
"City": {
"type": "string",
"parent": "State",
"hierarchy": "Geography",
folder: "All/Measure"
},
"Salesperson": {
"type": "string",
folder: "All/Measure"
},
"Payment Method": {
"type": "string",
folder: "All/Measure"
},
"Category": {
"type": "string",
folder: "All/Measure"
},
"Name": {
"type": "string",
"caption": "Product Name",
folder: "All/Measure"
},
"Price": {
"type": "number",
"caption": "Unit Price",
folder: "All/Measure"
},
"Quantity": {
"type": "number",
folder: "All/Measure"
},
"Revenue": {
"type": "number",
folder: "All/Measure"
},
"Shipping Cost": {
"type": "number",
folder: "All/Measure"
}
}
},
slice: {
rows: [{
...