Skip to content

Commit 8489bd6

Browse files
committed
First running version of the ngx-charts demo
1 parent 16f6b90 commit 8489bd6

36 files changed

+2685
-0
lines changed

charts/.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

charts/.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
7+
# dependencies
8+
/node_modules
9+
10+
# IDEs and editors
11+
/.idea
12+
.project
13+
.classpath
14+
.c9/
15+
*.launch
16+
.settings/
17+
18+
# IDE - VSCode
19+
.vscode/*
20+
!.vscode/settings.json
21+
!.vscode/tasks.json
22+
!.vscode/launch.json
23+
!.vscode/extensions.json
24+
25+
# misc
26+
/.sass-cache
27+
/connect.lock
28+
/coverage/*
29+
/libpeerconnection.log
30+
npm-debug.log
31+
testem.log
32+
/typings
33+
34+
# e2e
35+
/e2e/*.js
36+
/e2e/*.map
37+
38+
#System Files
39+
.DS_Store
40+
Thumbs.db

charts/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Charts
2+
3+
This project demonstrates how to use the chart library ngx-charts (formerly ng2d3). It was generated with [angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.24.
4+
5+
## State of the art
6+
Currently, this project only shows the one of the official demos, which I've extracted from the library source codes and moved into an Angular CLI project. Soon there's more to see.

charts/angular-cli.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"project": {
3+
"version": "1.0.0-beta.24",
4+
"name": "charts"
5+
},
6+
"apps": [
7+
{
8+
"root": "src",
9+
"outDir": "dist",
10+
"assets": [
11+
"assets",
12+
"favicon.ico"
13+
],
14+
"index": "index.html",
15+
"main": "main.ts",
16+
"test": "test.ts",
17+
"tsconfig": "tsconfig.json",
18+
"prefix": "",
19+
"mobile": false,
20+
"styles": [
21+
"styles.css",
22+
"../node_modules/@swimlane/ngx-charts/release/ngx-charts.css"
23+
],
24+
"scripts": [
25+
"assets/js/jquery.csv.js"
26+
],
27+
"environments": {
28+
"source": "environments/environment.ts",
29+
"dev": "environments/environment.ts",
30+
"prod": "environments/environment.prod.ts"
31+
}
32+
}
33+
],
34+
"addons": [],
35+
"packages": [],
36+
"e2e": {
37+
"protractor": {
38+
"config": "./protractor.conf.js"
39+
}
40+
},
41+
"test": {
42+
"karma": {
43+
"config": "./karma.conf.js"
44+
}
45+
},
46+
"defaults": {
47+
"styleExt": "css",
48+
"prefixInterfaces": false,
49+
"inline": {
50+
"style": false,
51+
"template": false
52+
},
53+
"spec": {
54+
"class": false,
55+
"component": true,
56+
"directive": true,
57+
"module": false,
58+
"pipe": true,
59+
"service": true
60+
}
61+
}
62+
}

charts/charts.iml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="WEB_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<excludeFolder url="file://$MODULE_DIR$/dist" />
7+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
8+
</content>
9+
<orderEntry type="inheritedJdk" />
10+
<orderEntry type="sourceFolder" forTests="false" />
11+
</component>
12+
</module>

charts/e2e/app.e2e-spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { ChartsPage } from './app.po';
2+
3+
describe('charts App', function() {
4+
let page: ChartsPage;
5+
6+
beforeEach(() => {
7+
page = new ChartsPage();
8+
});
9+
10+
it('should display message saying app works', () => {
11+
page.navigateTo();
12+
expect(page.getParagraphText()).toEqual('app works!');
13+
});
14+
});

charts/e2e/app.po.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { browser, element, by } from 'protractor';
2+
3+
export class ChartsPage {
4+
navigateTo() {
5+
return browser.get('/');
6+
}
7+
8+
getParagraphText() {
9+
return element(by.css('app-root h1')).getText();
10+
}
11+
}

charts/e2e/tsconfig.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"declaration": false,
5+
"emitDecoratorMetadata": true,
6+
"experimentalDecorators": true,
7+
"module": "commonjs",
8+
"moduleResolution": "node",
9+
"outDir": "../dist/out-tsc-e2e",
10+
"sourceMap": true,
11+
"target": "es5",
12+
"typeRoots": [
13+
"../node_modules/@types"
14+
]
15+
}
16+
}

charts/karma.conf.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/0.13/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', 'angular-cli'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-remap-istanbul'),
12+
require('angular-cli/plugins/karma')
13+
],
14+
files: [
15+
{ pattern: './src/test.ts', watched: false }
16+
],
17+
preprocessors: {
18+
'./src/test.ts': ['angular-cli']
19+
},
20+
mime: {
21+
'text/x-typescript': ['ts','tsx']
22+
},
23+
remapIstanbulReporter: {
24+
reports: {
25+
html: 'coverage',
26+
lcovonly: './coverage/coverage.lcov'
27+
}
28+
},
29+
angularCli: {
30+
config: './angular-cli.json',
31+
environment: 'dev'
32+
},
33+
reporters: config.angularCli && config.angularCli.codeCoverage
34+
? ['progress', 'karma-remap-istanbul']
35+
: ['progress'],
36+
port: 9876,
37+
colors: true,
38+
logLevel: config.LOG_INFO,
39+
autoWatch: true,
40+
browsers: ['Chrome'],
41+
singleRun: false
42+
});
43+
};

charts/package.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "charts",
3+
"version": "0.0.0",
4+
"license": "MIT",
5+
"angular-cli": {},
6+
"scripts": {
7+
"ng": "ng",
8+
"start": "ng serve",
9+
"lint": "tslint \"src/**/*.ts\"",
10+
"test": "ng test",
11+
"pree2e": "webdriver-manager update --standalone false --gecko false",
12+
"e2e": "protractor"
13+
},
14+
"private": true,
15+
"dependencies": {
16+
"@angular/common": "^2.4.0",
17+
"@angular/compiler": "^2.4.0",
18+
"@angular/core": "^2.4.0",
19+
"@angular/forms": "^2.4.0",
20+
"@angular/http": "^2.4.0",
21+
"@angular/platform-browser": "^2.4.0",
22+
"@angular/platform-browser-dynamic": "^2.4.0",
23+
"@angular/router": "^3.3.1",
24+
"@swimlane/ngx-charts": "^3.0.3",
25+
"core-js": "^2.4.1",
26+
"d3": "4.4.0",
27+
"moment": "2.17.1",
28+
"rxjs": "^5.0.2",
29+
"ts-helpers": "^1.1.1",
30+
"zone.js": "^0.7.2"
31+
},
32+
"devDependencies": {
33+
"@angular/compiler-cli": "^2.3.1",
34+
"@types/jasmine": "2.5.38",
35+
"@types/node": "^6.0.42",
36+
"angular-cli": "1.0.0-beta.24",
37+
"codelyzer": "~2.0.0-beta.1",
38+
"jasmine-core": "2.5.2",
39+
"jasmine-spec-reporter": "2.5.0",
40+
"karma": "1.2.0",
41+
"karma-chrome-launcher": "^2.0.0",
42+
"karma-cli": "^1.0.1",
43+
"karma-jasmine": "^1.0.2",
44+
"karma-remap-istanbul": "^0.2.1",
45+
"protractor": "~4.0.13",
46+
"ts-node": "1.2.1",
47+
"tslint": "^4.0.2",
48+
"typescript": "~2.0.3"
49+
}
50+
}

0 commit comments

Comments
 (0)