Skip to content

Instantly share code, notes, and snippets.

@lohithgn
Created June 23, 2015 08:20
Show Gist options
  • Save lohithgn/e514393c889167a23334 to your computer and use it in GitHub Desktop.
Save lohithgn/e514393c889167a23334 to your computer and use it in GitHub Desktop.
$(document).ready(function () {
var pivotgrid = $("#pivotgrid").kendoPivotGrid({
columnWidth: 120,
height: 275,
dataSource: {
data: leaveData,
schema: {
model: {
fields: {
Employee: { type: "string" },
Start: { type: "date" },
End: { type: "date" },
Type: { type: "string" },
Days: { type:"number" }
}
},
cube: {
dimensions: {
Employee: { },
Type: { }
},
measures: {
"Sum": { field: "Days",aggregate: "sum" }
}
}
},
columns:[{name:"Type",expand:true}],
rows: [{ name: "Employee", expand: true }],
measures: ["Sum"]
}
}).data("kendoPivotGrid");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment