ShowEmptyValues - Hierarchy Client
by inunziante
HTML
<link rel="stylesheet" href="https://cdn.flexmonster.com/2.3/demo.css">
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<div id="pivot-container"></div>
JavaScript
var data = [{
"Continent": "Asia",
"Climate": "Hot",
"Region": "India",
"Year": "2023",
"Month": "2023 - M12",
"Quantity": 100
},
{
"Continent": "Europe",
"Climate": "Warm",
"Region": "Italy",
"Year": "2024",
"Month": "2024 - M1",
"Quantity": 100
}
];
var pivot = new Flexmonster({
container: "pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
width: "100%",
height: 430,
report: {
"options": {
"showEmptyValues": "off"
},
"dataSource": {
"type": "json",
"data": data,
"mapping": {
"Continent": {
"type": "string"
},
"Climate": {
"type": "string"
},
"Region": {
"type": "string"
},
"Year": {
"type": "string",
"hierarchy": "Date",
showEmptyValues: true
},
"Month": {
"type": "string",
"hierarchy": "Date",
"parent": "Year",
showEmptyValues: true
},
"Quantity": {
"type": "number"
}
}
},
"slice": {
"rows": [{
"uniqueName": "Continent",
}, {
"uniqueName": "Region",
}, {
"uniqueName": "Date",
}],
"columns": [{
"uniqueName": "[Measures]"
}],
"measures": [{
"uniqueName": "Quantity"
}],
}
}
});