Flexmonster Demo: customSorting via setReport()
by Iryna Kulchytska
HTML
<script src="http://www.flexmonster.com/flexmonster/flexmonster.js"></script>
<button onclick="loadReport()">Load Report</button>
<div id="pivot-content"></div>
JavaScript
flexmonster.embedPivotComponent("http://flexmonster.com/flexmonster/", "pivot-content", "100%", "600", {
licenseKey: "Z53G-1T1WC3-1V1M-0L12-2M0A-1233-1I0Y-2Y2Q-1903-322S-0T2C-1I",
configuratorActive:false
}, true);
function loadReport() {
flexmonster.setReport({
dataSourceType: "csv",
filename: "http://www.flexmonster.com/download/data.csv",
configuratorActive:false,
rows: [
{ uniqueName: "Color",
customSorting: ["white", "yellow", "blue", "green", "purple", "red"]
}
],
columns: [{ uniqueName: "[Measures]" }],
measures: [{ uniqueName: "Price" }]
});
}