Skip to content

Instantly share code, notes, and snippets.

@cdaniel77

cdaniel77/app.html

Forked from adriatic/app.html
Last active Jun 7, 2016
Embed
What would you like to do?
Area charts: basic use
<template>
<ak-chart k-title.bind="{text: 'Gross Domestic product growth \n /GDP annual %/'}"
k-legend.bind="{position: 'bottom'}"
k-series-defaults.bind="seriesDefaults"
k-series.bind="series"
k-value-axis.bind="valueAxis"
k-category-axis.bind="categoryAxis"
k-tooltip.bind="tooltip">
</ak-chart>
</template>
export class BasicUse {
seriesDefaults = {
type: 'line'
};
series = [{
name: 'India',
data: [3.907, 7.943, 7.848, 9.284, null, null, null, 8.238, 9.552, 6.855]
}, {
name: 'World',
data: [1.988, 2.733, 3.994, 3.464, null, null, null, 2.245, 4.339, 2.727]
}, {
name: 'Haiti',
data: [0.253, 0.362, 3.519, 1.799, null, null, null, 2.877, 5.416, 5.590]
}];
valueAxis = {
labels: {
format: '{0}%'
},
line: {
visible: false
}
};
categoryAxis = {
categories: [2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011],
majorGridLines: {
visible: false
},
labels: {
rotation: 'auto'
}
};
tooltip = {
visible: true,
format: '{0}%',
template: '${series.name} ${value}'
}
}
<!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>
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