Last active
January 16, 2019 07:30
-
-
Save gregoryagu/c142fec54eb615b9414df777d320ea21 to your computer and use it in GitHub Desktop.
Aurelia Demo - Chart 16.4.0.42
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> | |
<div class="content-container-fluid"> | |
<ej-chart id="container" e-legend.bind="legend" e-size.bind="size" e-title.bind="title" e-common-series-options.bind="commonSeriesOptions"> | |
<ej-series e-data-source.bind="ExpendituresList" e-x-name="xName" e-y-name="yName"> | |
</ej-series> | |
</ej-chart> | |
</div> | |
<button click.delegate='update()'>Update</button> | |
</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 BasicUse { | |
constructor() { | |
this.ExpendituresList = [ | |
{xName: 'Name 1', yName: 70, text: 'Category 1'}, | |
{xName: 'Name 2', yName: 120, text: 'Category 2'}, | |
{xName: 'Name 3', yName: 473, text: 'Category 3'}, | |
{xName: 'Name 4', yName: 2577, text: 'Category 4'}, | |
{xName: 'Name 5', yName: 9090, text: 'Category 5'}, | |
{xName: 'Name 6', yName: 9658, text: 'Category 6'}]; | |
this.commonSeriesOptions = {marker: {dataLabel: {visible: true, shape: 'none', textMappingName: 'text', connectorLine: {type: 'bezier', color: 'black'}, font: {size: '14px'}}}, border: {width: 2, color: 'white'}, name: 'Expenses', type: 'pie', enableAnimation: true, labelPosition: 'outsideExtended', enableSmartLabels: true, startAngle: 145}; | |
this.size = {width: '900px', height: '550px'}; | |
this.title = {text: 'Expenditures'}; | |
this.legend = {visible: false}; | |
} | |
update(){ | |
this.ExpendituresList = | |
[ | |
{xName: 'Name A', yName: 9458, text: 'Other Personal, 88.47%'}, | |
{xName: 'Name B', yName: 9090, text: 'Medical care, 8.49%'}, | |
{xName: 'Name C', yName: 2577, text: 'Housing, 2.40%'}, | |
{xName: 'Name E', yName: 473, text: 'Transportation, 0.44%'}, | |
{xName: 'Name F', yName: 120, text: 'Education, 0.11%'}, | |
{xName: 'Name G', yName: 70, text: 'Electronics, 0.06%'}]; | |
} | |
} |
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 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.4.0.42/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 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