JSON array of arrays
Data source
HTML
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<div id="pivot-container"></div>
JavaScript
var inlineJSON = [
{
"Category": { "type": "string"},
"5": {"type": "string"},
"Price": {"type": "number"},
"1": {"type": "number"}
},
[
"Ice-cream",
"red",
23.32,
4
],
];
var pivot = new Flexmonster({
container: "pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
toolbar: true,
report: {
dataSource: {
data: inlineJSON
},
options: {
grid: {
type: 'flat'
}
}
/* slice: {
rows: [
{ uniqueName: "Category" }
],
columns: [
{ uniqueName: "Color" },
{ uniqueName: "[Measures]" }
],
measures: [
{ uniqueName: "Price" }
]
} */
}
});