Files
2022-11-04 13:24:24 +02:00

104 lines
3.3 KiB
HTML
Executable File

<!DOCTYPE html>
<html>
<head>
<title>Multi-axis</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>
function createChart() {
$("#chart").kendoChart({
title: {
text: "Hybrid car mileage report"
},
legend: {
position: "top"
},
series: [{
type: "column",
data: [20, 40, 45, 30, 50],
stack: true,
name: "on battery",
color: "#cc6e38"
}, {
type: "column",
data: [20, 30, 35, 35, 40],
stack: true,
name: "on gas",
color: "#ef955f"
}, {
type: "line",
data: [30, 38, 40, 32, 42],
name: "mpg",
color: "#ec5e0a",
axis: "mpg"
}, {
type: "line",
data: [7.8, 6.2, 5.9, 7.4, 5.6],
name: "l/100 km",
color: "#4e4141",
axis: "l100km"
}],
valueAxes: [{
title: { text: "miles" },
min: 0,
max: 100
}, {
name: "km",
title: { text: "km" },
min: 0,
max: 161,
majorUnit: 32
}, {
name: "mpg",
title: { text: "miles per gallon" },
color: "#ec5e0a"
}, {
name: "l100km",
title: { text: "liters per 100km" },
color: "#4e4141"
}],
categoryAxis: {
categories: ["Mon", "Tue", "Wed", "Thu", "Fri"],
// Align the first two value axes to the left
// and the last two to the right.
//
// Right alignment is done by specifying a
// crossing value greater than or equal to
// the number of categories.
axisCrossingValues: [0, 0, 10, 10]
}
});
}
$(document).ready(createChart);
$(document).bind("kendo:skinChange", createChart);
</script>
</div>
</body>
</html>