Skip to content

Commit 98f199f

Browse files
committed
ported test samples
1 parent 27536bc commit 98f199f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1707
-17
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"demo": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"architect": {
11+
"build": {
12+
"builder": "@angular-devkit/build-angular:browser",
13+
"options": {
14+
"outputPath": "dist/demo",
15+
"index": "src/index.html",
16+
"main": "src/main.ts",
17+
"polyfills": "src/polyfills.ts",
18+
"tsConfig": "src/config/tsconfig.app.json",
19+
"assets": [
20+
"src/assets"
21+
],
22+
"styles": [
23+
"src/styles.scss"
24+
],
25+
"scripts": []
26+
},
27+
"configurations": {
28+
"production": {
29+
"fileReplacements": [
30+
{
31+
"replace": "src/environments/environment.ts",
32+
"with": "src/environments/environment.prod.ts"
33+
}
34+
],
35+
"optimization": true,
36+
"outputHashing": "all",
37+
"sourceMap": false,
38+
"extractCss": true,
39+
"namedChunks": false,
40+
"aot": true,
41+
"extractLicenses": true,
42+
"vendorChunk": false,
43+
"buildOptimizer": true
44+
}
45+
}
46+
},
47+
"serve": {
48+
"builder": "@angular-devkit/build-angular:dev-server",
49+
"options": {
50+
"browserTarget": "demo:build"
51+
},
52+
"configurations": {
53+
"production": {
54+
"browserTarget": "demo:build:production"
55+
}
56+
}
57+
},
58+
"extract-i18n": {
59+
"builder": "@angular-devkit/build-angular:extract-i18n",
60+
"options": {
61+
"browserTarget": "demo:build"
62+
}
63+
},
64+
"test": {
65+
"builder": "@angular-devkit/build-angular:karma",
66+
"options": {
67+
"main": "src/test.ts",
68+
"polyfills": "src/polyfills.ts",
69+
"tsConfig": "src/config/tsconfig.spec.json",
70+
"karmaConfig": "src/config/karma.conf.js",
71+
"styles": [
72+
"styles.css"
73+
],
74+
"scripts": [],
75+
"assets": [
76+
"src/assets"
77+
]
78+
}
79+
},
80+
"lint": {
81+
"builder": "@angular-devkit/build-angular:tslint",
82+
"options": {
83+
"tsConfig": [
84+
"src/config/tsconfig.app.json",
85+
"src/config/tsconfig.spec.json"
86+
],
87+
"exclude": [
88+
"**/node_modules/**"
89+
]
90+
}
91+
}
92+
}
93+
}
94+
},
95+
"schematics": {
96+
"@schematics/angular:component": {
97+
"prefix": "app",
98+
"styleext": "scss"
99+
},
100+
"@schematics/angular:directive": {
101+
"prefix": "app"
102+
}
103+
},
104+
"defaultProject": "demo"
105+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"scripts": {
3+
"ng": "ng",
4+
"update": "ng update",
5+
"start": "node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng serve -o",
6+
"lint": "ng lint"
7+
},
8+
"dependencies": {
9+
"@angular/animations": "12.2.1",
10+
"@angular/common": "^12.2.1",
11+
"@angular/compiler": "12.2.1",
12+
"@angular/core": "^12.2.1",
13+
"@angular/forms": "12.2.1",
14+
"@angular/platform-browser": "12.2.1",
15+
"@angular/platform-browser-dynamic": "12.2.1",
16+
"@types/hammerjs": "^2.0.35",
17+
"classlist.js": "^1.1.20150312",
18+
"core-js": "^2.6.2",
19+
"hammerjs": "^2.0.8",
20+
"igniteui-angular": "12.1.3",
21+
"igniteui-angular-charts": "12.1.0",
22+
"igniteui-angular-core": "12.1.0",
23+
"igniteui-angular-excel": "12.1.0",
24+
"igniteui-angular-gauges": "12.1.0",
25+
"igniteui-angular-maps": "12.1.0",
26+
"igniteui-angular-excel": "12.1.0",
27+
"igniteui-angular-spreadsheet": "12.1.0",
28+
"igniteui-angular-spreadsheet-chart-adapter": "12.1.0",
29+
"intl": "^1.2.5",
30+
"jszip": "^3.1.5",
31+
"rxjs": "^6.5.4",
32+
"tslib": "^2.0.0",
33+
"web-animations-js": "^2.3.2",
34+
"zone.js": "~0.11.4"
35+
},
36+
"devDependencies": {
37+
"@angular-devkit/build-angular": "~12.2.1",
38+
"@angular/cli": "^12.2.1",
39+
"@angular/compiler-cli": "12.2.1",
40+
"@angular/language-service": "12.2.1",
41+
"@types/node": "^12.11.1",
42+
"codelyzer": "^6.0.0",
43+
"jasmine-core": "~3.6.0",
44+
"jasmine-spec-reporter": "~5.0.0",
45+
"node-sass": "4.11.0",
46+
"sass.js": "0.10.13",
47+
"ts-node": "^7.0.1",
48+
"tslint": "~6.1.0",
49+
"typescript": "4.3.5"
50+
}
51+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<div class="container sample">
2+
<div class="options horizontal">
3+
<label class="options-label">Chart Type: </label>
4+
<select [(ngModel)]="chartType">
5+
<option>Column</option>
6+
<option>Area</option>
7+
<option>Line</option>
8+
<option>Point</option>
9+
<option>Spline</option>
10+
<option>SplineArea</option>
11+
<option>StepArea</option>
12+
<option>StepLine</option>
13+
</select>
14+
15+
<label class="options-label">Enable Highlighting:</label>
16+
<label class="options-item"><input [(ngModel)]="isSeriesHighlightingEnabled" type="checkbox" /> Series </label>
17+
<label class="options-item"><input [(ngModel)]="isItemHighlightingEnabled" type="checkbox" />Item </label>
18+
<label class="options-item"><input [(ngModel)]="isCategoryHighlightingEnabled" type="checkbox" />Category </label>
19+
</div>
20+
21+
<div class="options vertical">
22+
<label id="legendTitle">Olympic Medals By Country</label>
23+
</div>
24+
<div class="container">
25+
<igx-category-chart
26+
#chart
27+
height="100%" width="100%"
28+
[dataSource]="olympicData"
29+
[isItemHighlightingEnabled]="isItemHighlightingEnabled"
30+
[isCategoryHighlightingEnabled]="isCategoryHighlightingEnabled"
31+
[isSeriesHighlightingEnabled]="isSeriesHighlightingEnabled"
32+
[chartType]="chartType"
33+
34+
yAxisTitle="Total Medals"
35+
yAxisTitleTextStyle="12pt Verdana"
36+
yAxisTitleTextColor="gray"
37+
yAxisTitleAngle="90"
38+
yAxisTitleLeftMargin="5"
39+
tooltipType="None">
40+
</igx-category-chart>
41+
</div>
42+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* styles are loaded the Shared CSS file located at:
2+
https://static.infragistics.com/xplatform/css/samples/
3+
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import {
2+
AfterViewInit,
3+
ChangeDetectionStrategy,
4+
Component,
5+
ViewChild
6+
} from "@angular/core";
7+
import { IgxCategoryChartComponent } from "igniteui-angular-charts";
8+
9+
@Component({
10+
changeDetection: ChangeDetectionStrategy.OnPush,
11+
selector: "app-root",
12+
styleUrls: ["./app.component.scss"],
13+
templateUrl: "./app.component.html"
14+
})
15+
export class AppComponent {
16+
17+
@ViewChild("chart", { static: true })
18+
public chart: IgxCategoryChartComponent;
19+
public isItemHighlightingEnabled: boolean = true;
20+
public isSeriesHighlightingEnabled: boolean = true;
21+
public isCategoryHighlightingEnabled: boolean = false;
22+
public olympicData: any;
23+
public chartType: string = "Column";
24+
25+
constructor() {
26+
const usaMedals: any = [
27+
{ Year: "1996", UnitedStates: 148 },
28+
{ Year: "2000", UnitedStates: 142 },
29+
{ Year: "2004", UnitedStates: 134 },
30+
{ Year: "2008", UnitedStates: 131 },
31+
{ Year: "2012", UnitedStates: 135 },
32+
{ Year: "2016", UnitedStates: 146 }
33+
];
34+
const chinaMedals: any = [
35+
{ Year: "1996", China: 110 },
36+
{ Year: "2000", China: 115 },
37+
{ Year: "2004", China: 121 },
38+
{ Year: "2008", China: 129 },
39+
{ Year: "2012", China: 115 },
40+
{ Year: "2016", China: 112 }
41+
];
42+
const russiaMedals: any = [
43+
{ Year: "1996", Russia: 95 },
44+
{ Year: "2000", Russia: 91 },
45+
{ Year: "2004", Russia: 86 },
46+
{ Year: "2008", Russia: 65 },
47+
{ Year: "2012", Russia: 77 },
48+
{ Year: "2016", Russia: 88 }
49+
];
50+
this.olympicData = [ usaMedals, chinaMedals, russiaMedals ];
51+
}
52+
53+
public ngAfterViewInit(): void {
54+
}
55+
56+
public initHighlighting(): void {
57+
this.chart.isItemHighlightingEnabled = true;
58+
this.chart.isCategoryHighlightingEnabled = true;
59+
this.chart.isSeriesHighlightingEnabled = true;
60+
}
61+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig.app.json",
3+
"compilerOptions": {
4+
"target": "es5"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "./tsconfig.base.json",
3+
"compilerOptions": {
4+
"outDir": "../../out-tsc/app",
5+
"baseUrl": "./",
6+
"types": []
7+
},
8+
"files": [
9+
"../main.ts",
10+
"../polyfills.ts"
11+
]
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"importHelpers": true,
5+
"module": "es2020",
6+
"outDir": "../../dist/out-tsc",
7+
"sourceMap": false,
8+
"declaration": false,
9+
"moduleResolution": "node",
10+
"experimentalDecorators": true,
11+
"downlevelIteration": true, // required for excel library
12+
"target": "es5",
13+
"typeRoots": [
14+
"../../node_modules/@types"
15+
],
16+
"lib": [
17+
"es2017",
18+
"dom"
19+
]
20+
}
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extends": "./tsconfig.base.json",
3+
"compilerOptions": {
4+
"outDir": "../../out-tsc/spec",
5+
"baseUrl": "./",
6+
"types": [
7+
"jasmine",
8+
"node"
9+
]
10+
},
11+
"files": [
12+
"../test.ts",
13+
"../polyfills.ts"
14+
],
15+
"include": [
16+
"../**/*.spec.ts",
17+
"../**/*.d.ts"
18+
]
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "./tsconfig.base.json",
3+
"compilerOptions": {
4+
"outDir": "../../out-tsc/worker",
5+
"lib": [
6+
"es2018",
7+
"DOM"
8+
],
9+
"types": []
10+
},
11+
"include": [
12+
"../**/*Worker.ts"
13+
]
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<title>IgniteUI for Angular | Example | infragistics</title>
7+
<base href="/">
8+
9+
<meta name="viewport" content="width=device-width, initial-scale=1">
10+
<link href="https://static.infragistics.com/xplatform/images/browsers/angular.ico" rel="icon" type="image/x-icon" >
11+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
12+
<link href="https://fonts.googleapis.com/css?family=Titillium+Web:300,400,600,700" rel="stylesheet">
13+
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
14+
<link href="https://static.infragistics.com/xplatform/css/samples/shared.v5.css" rel="stylesheet">
15+
<link href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" rel="stylesheet" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
16+
</head>
17+
18+
<body class="igx-typography">
19+
<app-root></app-root>
20+
</body>
21+
22+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// tslint:disable:no-string-literal
2+
import "./polyfills";
3+
import { enableProdMode } from "@angular/core";
4+
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
5+
import { AppModule } from "./app/app.module";
6+
7+
platformBrowserDynamic().bootstrapModule(AppModule).then(ref => {
8+
// ensure Angular destroys itself on hot reloads.
9+
if (window["ngRef"]) {
10+
window["ngRef"].destroy();
11+
}
12+
window["ngRef"] = ref;
13+
14+
// otherwise, log the boot error
15+
}).catch(err => console.error(err));

0 commit comments

Comments
 (0)