Last active
August 8, 2018 08:49
-
-
Save dharanidharandharmasivam/13f8230b9deb23a92ed411efb877e488 to your computer and use it in GitHub Desktop.
This file contains hidden or 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> | |
<div> | |
<ej-chart id="chart-container" e-on-pre-render.trigger="chartPreRender($event)" e-primary-y-axis.bind="primaryYAxis" e-primary-x-axis.bind="primaryXAxis" e-legend.bind="legend"> | |
<template repeat.for="level of EfficiencyList"> | |
<ej-series e-data-source.bind="level.level" e-x-name="Year" e-y-name="yName" e-type="line" e-marker.bind="marker"> | |
</ej-series> | |
</template> | |
</ej-chart> | |
</div> | |
<button id='button' click.trigger = "myFunction()">Click to update</button> | |
</template> |
This file contains hidden or 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 BasicUse { | |
constructor() { | |
this.EfficiencyList = [ | |
{ | |
'level': [ | |
{'Year': '2005', 'yName': 28}, | |
{'Year': '2006', 'yName': 25}, | |
{'Year': '2007', 'yName': 26}] | |
}, | |
{ | |
'level': [ | |
{'Year': '2005', 'yName': 31}, | |
{'Year': '2006', 'yName': 28}, | |
{'Year': '2007', 'yName': 30}] | |
}, | |
{'level': [ | |
{'Year': '2005', 'yName': 36}, | |
{'Year': '2006', 'yName': 32}, | |
{'Year': '2007', 'yName': 34}] | |
}, | |
]; | |
this.commonSeries = {type: 'line', enableAnimation: true, tooltip: {visible: true}, marker: {shape: 'circle', size: {height: 10, width: 10}, visible: true}, border: {width: 2}}; | |
this.size = {width: '100%', height: '550px'}; | |
this.title = {text: 'Efficiency of oil-fired power production'}; | |
this.primaryXAxis = {title: {text: 'Year'}}; | |
this.primaryYAxis = {labelFormat: '{value}%', title: {text: 'Efficiency'}, range: {min: 25, max: 50, interval: 5}}; | |
} | |
chartPreRender(args) { | |
debugger; | |
} | |
myFunction() { | |
debugger | |
this.EfficiencyList = [ | |
{ | |
'level': [ | |
{'Year': '2005', 'yName': 28}, | |
{'Year': '2006', 'yName': 25}, | |
{'Year': '2007', 'yName': 26}] | |
}, | |
{ | |
'level': [ | |
{'Year': '2005', 'yName': 31}, | |
{'Year': '2006', 'yName': 28}, | |
{'Year': '2007', 'yName': 30}] | |
} | |
]; | |
// let chartObj = $("#chart-container").data("ejChart"); | |
//chartObj.redraw(); | |
} | |
} | |
This file contains hidden or 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 xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content="Essential Studio for JavaScript"> | |
<meta name="author" content="Syncfusion"> | |
<title>Untitled</title> | |
<!-- Essential Studio for JavaScript theme reference --> | |
<link rel="stylesheet" href="https://cdn.syncfusion.com/16.2.0.41/js/web/flat-azure/ej.web.all.min.css" /> | |
</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-syncfusion-bundles/0.0.1/config2.js"></script> | |
<script> | |
System.import('aurelia-bootstrapper'); | |
</script> | |
</body> | |
</html> |
This file contains hidden or 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-syncfusion-bridge', syncfusion => syncfusion.useAll()); | |
aurelia.start().then(a => a.setRoot()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment