Files
jube-fork/Jube.App/wwwroot/kendo/examples/pivotgrid/kpi.html
2022-11-04 13:24:24 +02:00

95 lines
3.0 KiB
HTML
Executable File

<!DOCTYPE html>
<html>
<head>
<title>KPI measures</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>
<div id="example">
<div id="configurator" class="hidden-on-narrow"></div>
<div id="pivotgrid" class="hidden-on-narrow"></div>
<div class="responsive-message"></div>
<script>
$(document).ready(function () {
var pivotgrid = $("#pivotgrid").kendoPivotGrid({
filterable: true,
sortable: true,
columnWidth: 200,
height: 580,
dataSource: {
type: "xmla",
columns: [{ name: "[Date].[Calendar]", expand: true }, { name: "[Product].[Category]" } ],
rows: [{ name: "[Geography].[City]" }],
measures: [
{ name: "[Measures].[Internet Revenue Status]", type: "status" }, //KPI Status measure that will render kpiStatusTemplate
{ name: "[Measures].[Internet Revenue Trend]", type: "trend" } //KPI Trend measure that will render kpiTrendTemplate
],
transport: {
connection: {
catalog: "Adventure Works DW 2008R2",
cube: "Adventure Works"
},
read: "https://demos.telerik.com/olap/msmdpump.dll"
},
schema: {
type: "xmla"
},
error: function (e) {
alert("error: " + kendo.stringify(e.errors[0]));
}
}
}).data("kendoPivotGrid");
$("#configurator").kendoPivotConfigurator({
dataSource: pivotgrid.dataSource,
filterable: true,
sortable: true,
height: 580
});
});
</script>
<style>
#configurator {
width: 400px;
min-width: 400px;
display: inline-block;
vertical-align: top;
}
#pivotgrid {
width: 67%;
display: inline-block;
vertical-align: top;
}
.hidden-on-narrow {
display: inline-block;
vertical-align: top;
}
</style>
</div>
</body>
</html>