mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-02 14:29:36 +00:00
98 lines
3.3 KiB
HTML
Executable File
98 lines
3.3 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Local binding</title>
|
|
<meta charset="utf-8">
|
|
<link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.common.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.rtl.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.mobile.min.css" rel="stylesheet">
|
|
<script src="../../js/jquery.min.js"></script>
|
|
<script src="../../js/jszip.min.js"></script>
|
|
<script src="../../js/kendo.all.min.js"></script>
|
|
<script src="../content/shared/js/console.js"></script>
|
|
<script>
|
|
|
|
</script>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<a class="offline-button" href="../index.html">Back</a>
|
|
|
|
<script src="../content/shared/js/products.js"></script>
|
|
|
|
<div id="example">
|
|
<div class="hidden-on-narrow" id="configurator"></div>
|
|
<div class="hidden-on-narrow" id="pivotgrid"></div>
|
|
|
|
<div class="responsive-message"></div>
|
|
|
|
<script>
|
|
$(document).ready(function () {
|
|
var pivotgrid = $("#pivotgrid").kendoPivotGrid({
|
|
filterable: true,
|
|
sortable: true,
|
|
columnWidth: 120,
|
|
height: 570,
|
|
dataSource: {
|
|
data: products,
|
|
schema: {
|
|
model: {
|
|
fields: {
|
|
ProductName: { type: "string" },
|
|
UnitPrice: { type: "number" },
|
|
UnitsInStock: { type: "number" },
|
|
Discontinued: { type: "boolean" },
|
|
CategoryName: { field: "Category.CategoryName" }
|
|
}
|
|
},
|
|
cube: {
|
|
dimensions: {
|
|
ProductName: { caption: "All Products" },
|
|
CategoryName: { caption: "All Categories" },
|
|
Discontinued: { caption: "Discontinued" }
|
|
},
|
|
measures: {
|
|
"Sum": { field: "UnitPrice", format: "{0:c}", aggregate: "sum" },
|
|
"Average": { field: "UnitPrice", format: "{0:c}", aggregate: "average" }
|
|
}
|
|
}
|
|
},
|
|
columns: [{ name: "CategoryName", expand: true }, { name: "ProductName" } ],
|
|
rows: [{ name: "Discontinued", expand: true }],
|
|
measures: ["Sum"]
|
|
}
|
|
}).data("kendoPivotGrid");
|
|
|
|
$("#configurator").kendoPivotConfigurator({
|
|
dataSource: pivotgrid.dataSource,
|
|
filterable: true,
|
|
sortable:true,
|
|
height: 570
|
|
});
|
|
});
|
|
</script>
|
|
<style>
|
|
#configurator {
|
|
width: 400px;
|
|
min-width: 400px;
|
|
display: inline-block;
|
|
vertical-align: top;
|
|
}
|
|
|
|
#pivotgrid {
|
|
width: 67%;
|
|
display: inline-block;
|
|
vertical-align: top;
|
|
}
|
|
</style>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|