mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-03 01:01:41 +00:00
113 lines
3.1 KiB
HTML
Executable File
113 lines
3.1 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Binding to local data</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 class="demo-section k-content wide">
|
|
<div id="chart"></div>
|
|
</div>
|
|
<script>
|
|
var cashFlowData = [{
|
|
period: "Beginning\nBalance",
|
|
amount: 50000
|
|
}, {
|
|
period: "Jan",
|
|
amount: 17000
|
|
}, {
|
|
period: "Feb",
|
|
amount: 14000
|
|
}, {
|
|
period: "Mar",
|
|
amount: -12000
|
|
}, {
|
|
period: "Q1",
|
|
summary: "runningTotal"
|
|
}, {
|
|
period: "Apr",
|
|
amount: -22000
|
|
}, {
|
|
period: "May",
|
|
amount: -18000
|
|
}, {
|
|
period: "Jun",
|
|
amount: 10000
|
|
}, {
|
|
period: "Q2",
|
|
summary: "runningTotal"
|
|
}, {
|
|
period: "Ending\nBalance",
|
|
summary: "total"
|
|
}];
|
|
|
|
function createChart() {
|
|
$("#chart").kendoChart({
|
|
dataSource: {
|
|
data: cashFlowData
|
|
},
|
|
title: {
|
|
text: "Cash flow"
|
|
},
|
|
legend: {
|
|
visible: false
|
|
},
|
|
series: [{
|
|
type: "waterfall",
|
|
field: "amount",
|
|
categoryField: "period",
|
|
summaryField: "summary",
|
|
color: function(point) {
|
|
var summary = point.dataItem.summary;
|
|
if (summary) {
|
|
return summary == "total" ? "#555" : "gray";
|
|
}
|
|
|
|
if (point.value > 0) {
|
|
return "green";
|
|
} else {
|
|
return "red";
|
|
}
|
|
},
|
|
labels: {
|
|
visible: true,
|
|
format: "C0",
|
|
position: "insideEnd"
|
|
}
|
|
}],
|
|
valueAxis: {
|
|
labels: {
|
|
format: "C0"
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
$(document).ready(createChart);
|
|
$(document).bind("kendo:skinChange", createChart);
|
|
</script>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|