Skip to content

Commit 0eaca1c

Browse files
committed
Plugin v0.0.0
0 parents  commit 0eaca1c

16 files changed

+514
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
typings/

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Angular JS 2.0 Component for FusionCharts
2+
=========================================
3+
4+
Easily integrate FusionCharts into your Angular 2.0 app.
5+
6+
QuickStart
7+
----------

examples/app/app.component.js

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/app/app.component.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/app/app.component.ts

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import { Component } from '@angular/core';
2+
import { AngularFusionCharts } from '../../src/angular-fusioncharts';
3+
@Component({
4+
selector: 'my-app',
5+
template: `<h1>My First Angular 2 App</h1>
6+
<fusioncharts width="400px" height="400px" [type]="chartType" id="chart-container" dataFormat="json" [dataSource]="data"></fusioncharts>`,
7+
directives: [AngularFusionCharts]
8+
})
9+
export class AppComponent {
10+
data
11+
chartType = "column2d";
12+
constructor () {
13+
this.data = {
14+
"chart": {
15+
"caption": "Top 5 Stores by Sales",
16+
"subCaption": "Last month",
17+
"yAxisName": "Sales (In USD)",
18+
"numberPrefix": "$",
19+
"paletteColors": "#0075c2",
20+
"bgColor": "#ffffff",
21+
"showBorder": "0",
22+
"showCanvasBorder": "0",
23+
"usePlotGradientColor": "0",
24+
"plotBorderAlpha": "10",
25+
"placeValuesInside": "1",
26+
"valueFontColor": "#ffffff",
27+
"showAxisLines": "1",
28+
"axisLineAlpha": "25",
29+
"divLineAlpha": "10",
30+
"alignCaptionWithCanvas": "0",
31+
"showAlternateVGridColor": "0",
32+
"captionFontSize": "14",
33+
"subcaptionFontSize": "14",
34+
"subcaptionFontBold": "0",
35+
"toolTipColor": "#ffffff",
36+
"toolTipBorderThickness": "0",
37+
"toolTipBgColor": "#000000",
38+
"toolTipBgAlpha": "80",
39+
"toolTipBorderRadius": "2",
40+
"toolTipPadding": "5"
41+
},
42+
43+
"data": [
44+
{
45+
"label": "Bakersfield Central",
46+
"value": "880000"
47+
},
48+
{
49+
"label": "Garden Groove harbour",
50+
"value": "730000"
51+
},
52+
{
53+
"label": "Los Angeles Topanga",
54+
"value": "590000"
55+
},
56+
{
57+
"label": "Compton-Rancho Dom",
58+
"value": "520000"
59+
},
60+
{
61+
"label": "Daly City Serramonte",
62+
"value": "330000"
63+
}
64+
]
65+
};
66+
setTimeout (()=> {
67+
this.chartType = "bar2d";
68+
})
69+
}
70+
}

examples/app/main.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/app/main.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/app/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { bootstrap } from '@angular/platform-browser-dynamic';
2+
import { AppComponent } from './app.component';
3+
bootstrap(AppComponent);

examples/index.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<html>
2+
<head>
3+
<title>Angular 2 QuickStart</title>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<link rel="stylesheet" href="styles.css">
7+
<!-- 1. Load libraries -->
8+
<!-- Polyfill(s) for older browsers -->
9+
<script src="../node_modules/core-js/client/shim.min.js"></script>
10+
<script src="../node_modules/zone.js/dist/zone.js"></script>
11+
<script src="../node_modules/reflect-metadata/Reflect.js"></script>
12+
<script src="../node_modules/systemjs/dist/system.src.js"></script>
13+
<!-- 2. Configure SystemJS -->
14+
<script src="../systemjs.config.js"></script>
15+
16+
17+
18+
</head>
19+
<!-- 3. Display the application -->
20+
<body>
21+
<my-app>Loading...</my-app>
22+
<script type="text/javascript" src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
23+
<script>
24+
System.import('app').catch(function(err){ console.error(err); });
25+
</script>
26+
</body>
27+
</html>

package.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "angular2-fusioncharts",
3+
"version": "0.0.0",
4+
"scripts": {
5+
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
6+
"lite": "lite-server",
7+
"postinstall": "typings install",
8+
"tsc": "tsc",
9+
"tsc:w": "tsc -w",
10+
"typings": "typings"
11+
},
12+
"license": "MIT",
13+
"dependencies": {
14+
"@angular/common": "2.0.0-rc.3",
15+
"@angular/compiler": "2.0.0-rc.3",
16+
"@angular/core": "2.0.0-rc.3",
17+
"@angular/forms": "0.1.1",
18+
"@angular/http": "2.0.0-rc.3",
19+
"@angular/platform-browser": "2.0.0-rc.3",
20+
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
21+
"@angular/router": "3.0.0-alpha.7",
22+
"@angular/router-deprecated": "2.0.0-rc.2",
23+
"@angular/upgrade": "2.0.0-rc.3",
24+
"systemjs": "0.19.27",
25+
"core-js": "^2.4.0",
26+
"reflect-metadata": "^0.1.3",
27+
"rxjs": "5.0.0-beta.6",
28+
"zone.js": "^0.6.12",
29+
"angular2-in-memory-web-api": "0.0.12",
30+
"bootstrap": "^3.3.6"
31+
},
32+
"devDependencies": {
33+
"concurrently": "^2.0.0",
34+
"lite-server": "^2.2.0",
35+
"typescript": "^1.8.10",
36+
"typings":"^1.0.4"
37+
}
38+
}

0 commit comments

Comments
 (0)