JSFiddle - React, Tailwind, and code Playground
by Flexmonster Pivot Table
HTML
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<div id="pivot-container"></div>
JavaScript
new Flexmonster({
container: "#pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
width: "100%",
height: 550,
toolbar: true,
report: {
dataSource: {
mapping: {
DateWY: {
hierarchy: "Metai sav.",
caption: "Metai",
type: "number",
},
DateW: {
hierarchy: "Metai sav.",
caption: "SavaitÄ—",
type: "number",
parent: "DateWY"
},
},
data: [
{
"DateWY": 2022,
"DateW": 1,
"Price": 100,
"OrderId": "1337889",
},
{
"DateWY": 2022,
"DateW": 2,
"Price": 300,
"OrderId": "3324312",
},{
"DateWY": 2021,
"DateW": 53,
"Price": 200,
"OrderId": "3225567",
},
]
}
}
});