Test weeks
by sergin
HTML
<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: {
dataSourceType: "json",
mapping: {
"Month": {
"type": "string",
},
"Week": {
"type": "string",
},
"Product": {
"type": "string"
},
"Price": {
"type": "number"
}
},
data: [{
"Month": "Dec2019",
"Week": "week50",
"Product": "apple",
"Price": 1
},
{
"Month": "Dec2019",
"Week": "week51",
"Product": "orange",
"Price": 1
},
{
"Month": "Jan2020",
"Week": "week1",
"Product": "orange",
"Price": 1
},
{
"Month": "Jan2020",
"Week": "week2",
"Product": "pear",
"Price": 1
}
]
},
options: {
showEmptyValues: "columns"
},
slice: {
rows: [{
uniqueName: "Product",
"filter": {
"exclude": [
"product.[apple]"
]
}
}],
columns: [{
uniqueName: "Month"
},{
uniqueName: "Week"
}, {
uniqueName: "[Measures]"
}],
measures: [{
uniqueName: "Price"
}],
expands: { expandAll: true },
drills: { drillAll: true }
}
}
});