-
-
Save JeroenVinke/bc182d524377d07338397e2a8c5e2e3a to your computer and use it in GitHub Desktop.
Bar chart: Multi axis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<ak-chart k-title.bind="{text: 'Hybrid car mileage report'}" | |
k-legend.bind="{position: 'top'}" | |
k-series.bind="series" | |
k-value-axis.bind="valueAxis" | |
k-category-axis.bind="categoryAxis" | |
view-model.ref="chart"> | |
</ak-chart> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class MultiAxis { | |
attached() { | |
this.getRemoteData(); | |
} | |
getRemoteData() { | |
series = ; | |
valueAxis = ; | |
categoryAxis = ; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"series": [{ | |
"type": "column", | |
"data": [20, 40, 45, 30, 50], | |
"stack": true, | |
"name": "on battery", | |
"color": "#003c72" | |
}, { | |
"type": "column", | |
"data": [20, 30, 35, 35, 40], | |
"stack": true, | |
"name": "on gas", | |
"color": "#0399d4" | |
}, { | |
"type": "line", | |
"data": [30, 38, 40, 32, 42], | |
"name": "mpg", | |
"color": "#642381", | |
"axis": "mpg" | |
}, { | |
"type": "line", | |
"data": [7.8, 6.2, 5.9, 7.4, 5.6], | |
"name": "l/100 km", | |
"color": "#e5388a", | |
"axis": "l100km" | |
}], | |
"valueAxis": [{ | |
"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": "#642381" | |
}, { | |
"name": "l100km", | |
"title": { text: "liters per 100km" }, | |
"color": "#e5388a" | |
}], | |
"categoryAxis": { | |
categories: ["Mon", "Tue", "Wed", "Thu", "Fri"], | |
axisCrossingValues: [0, 0, 10, 10] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Aurelia</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.common.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.rtl.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.default.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.mobile.all.min.css"> | |
<script src="https://kendo.cdn.telerik.com/2016.1.226/js/jszip.min.js"></script> | |
</head> | |
<body aurelia-app="main"> | |
<h1>Loading...</h1> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.6/system.js"></script> | |
<script src="https://rawgit.com/aurelia-ui-toolkits/aurelia-kendoui-bundles/0.3.5/config2.js"></script> | |
<!--<script src="./config2.js"></script>--> | |
<script> | |
System.import('aurelia-bootstrapper'); | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function configure(aurelia) { | |
aurelia.use | |
.standardConfiguration() | |
.developmentLogging() | |
.plugin('aurelia-kendoui-bridge', kendo => kendo.pro()); | |
aurelia.start().then(a => a.setRoot()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment