Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/donut-ava4/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18
17 changes: 17 additions & 0 deletions tests/donut-ava4/.codesandbox/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
// These tasks will run in order when initializing your CodeSandbox project.
"setupTasks": [
{
"name": "Install Dependencies",
"command": "yarn install"
}
],
// These tasks can be run from CodeSandbox. Running one will open a log in the app.
"tasks": {
"node node_modules/@angular/cli/bin/ng serve -o --disable-host-check": {
"name": "Start Project",
"command": "node node_modules/@angular/cli/bin/ng serve -o --disable-host-check",
"runAtStart": true
}
}
}
1 change: 1 addition & 0 deletions tests/donut-ava4/.stackblitzrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"installDependencies":true, "startCommand":"npm start"}
120 changes: 120 additions & 0 deletions tests/donut-ava4/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"demo": {
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/demo",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": [
"src/polyfills.ts"
],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": [],
"stylePreprocessorOptions": {
"includePaths": ["node_modules/"]
}
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all",
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
]
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"buildTarget": "demo:build:production"
},
"development": {
"buildTarget": "demo:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "demo:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"styles": [
"src/styles.scss"
],
"scripts": [],
"assets": [
"src/assets"
],
"inlineStyleLanguage": "scss",
"stylePreprocessorOptions": {
"includePaths": ["node_modules/"]
}
}
}
}
}
},
"defaultProject": "demo",
"cli": {
"analytics": false
}
}
45 changes: 45 additions & 0 deletions tests/donut-ava4/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"scripts": {
"ng": "ng",
"update": "ng update",
"start": "node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng serve -o",
"build": "node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng build --configuration production",
"lint": "ng lint"
},
"dependencies": {
"@angular/animations": "^17.2.1",
"@angular/common": "^17.2.1",
"@angular/compiler": "^17.2.1",
"@angular/core": "^17.2.1",
"@angular/forms": "^17.2.1",
"@angular/platform-browser": "^17.2.1",
"@angular/platform-browser-dynamic": "^17.2.1",
"@angular/router": "^17.2.1",
"@types/hammerjs": "^2.0.39",
"classlist.js": "1.1.20150312",
"core-js": "3.21.0",
"hammerjs": "^2.0.8",
"igniteui-angular": "17.2.0",
"igniteui-angular-charts": "17.3.1-alpha.0",
"igniteui-angular-core": "17.3.1-alpha.0",
"intl": "1.2.5",
"jszip": "3.8.0",
"rxjs": "^7.8.1",
"tslib": "^2.6.1",
"web-animations-js": "2.3.2",
"zone.js": "~0.14.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "17.2.0",
"@angular/cli": "17.2.0",
"@angular/compiler-cli": "17.2.1",
"@angular/language-service": "17.2.1",
"@types/node": "18.17.0",
"codelyzer": "6.0.2",
"jasmine-core": "5.1.1",
"jasmine-spec-reporter": "~4.2.1",
"sass.js": "0.11.1",
"ts-node": "10.9.1",
"typescript": "5.3.3"
}
}
51 changes: 51 additions & 0 deletions tests/donut-ava4/src/EnergyGlobalDemand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
export class EnergyGlobalDemandItem {
public constructor(init: Partial<EnergyGlobalDemandItem>) {
Object.assign(this, init);
}

public value: number;
public category: string;
public summary: string;

}
export class EnergyGlobalDemand extends Array<EnergyGlobalDemandItem> {
public constructor(items: Array<EnergyGlobalDemandItem> | number = -1) {
if (Array.isArray(items)) {
super(...items);
} else {
const newItems = [
new EnergyGlobalDemandItem(
{
value: 37,
category: `Cooling`,
summary: `Cooling 37%`
}),
new EnergyGlobalDemandItem(
{
value: 25,
category: `Residential`,
summary: `Residential 25%`
}),
new EnergyGlobalDemandItem(
{
value: 12,
category: `Heating`,
summary: `Heating 12%`
}),
new EnergyGlobalDemandItem(
{
value: 11,
category: `Lighting`,
summary: `Lighting 11%`
}),
new EnergyGlobalDemandItem(
{
value: 15,
category: `Other`,
summary: `Other 15%`
}),
];
super(...(newItems.slice(0, items)));
}
}
}
33 changes: 33 additions & 0 deletions tests/donut-ava4/src/app.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<div class="container vertical sample">
<div class="legend-title">
Global Electricity Demand by Energy Use
</div>
<div class="legend">
<igx-item-legend
name="Legend"
#legend
orientation="Horizontal">
</igx-item-legend>
</div>
<div class="container fill">
<igx-doughnut-chart
name="chart"
#chart
allowSliceExplosion="true">
<igx-ring-series
name="series"
#series
labelMemberPath="summary"
labelsPosition="OutsideEnd"
labelExtent="30"
valueMemberPath="value"
legendLabelMemberPath="category"
outlines="white"
radiusFactor="0.6"
startAngle="30"
[dataSource]="energyGlobalDemand"
[legend]="legend">
</igx-ring-series>
</igx-doughnut-chart>
</div>
</div>
3 changes: 3 additions & 0 deletions tests/donut-ava4/src/app.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* styles are loaded the Shared CSS file located at:
https://static.infragistics.com/xplatform/css/samples/
*/
39 changes: 39 additions & 0 deletions tests/donut-ava4/src/app.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { AfterViewInit, Component, ViewChild, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
import { EnergyGlobalDemandItem, EnergyGlobalDemand } from './EnergyGlobalDemand';
import { IgxItemLegendComponent, IgxDoughnutChartComponent, IgxRingSeriesComponent } from 'igniteui-angular-charts';

@Component({
selector: "app-root",
styleUrls: ["./app.component.scss"],
templateUrl: "./app.component.html",
changeDetection: ChangeDetectionStrategy.OnPush
})

export class AppComponent implements AfterViewInit
{

@ViewChild("legend", { static: true } )
private legend: IgxItemLegendComponent
@ViewChild("chart", { static: true } )
private chart: IgxDoughnutChartComponent
@ViewChild("series", { static: true } )
private series: IgxRingSeriesComponent
private _energyGlobalDemand: EnergyGlobalDemand = null;
public get energyGlobalDemand(): EnergyGlobalDemand {
if (this._energyGlobalDemand == null)
{
this._energyGlobalDemand = new EnergyGlobalDemand();
}
return this._energyGlobalDemand;
}

public constructor(private _detector: ChangeDetectorRef)
{
}

public ngAfterViewInit(): void
{
}

}

26 changes: 26 additions & 0 deletions tests/donut-ava4/src/app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { NgModule } from "@angular/core";
import { FormsModule } from "@angular/forms";
import { CommonModule } from "@angular/common";
import { BrowserModule } from "@angular/platform-browser";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { AppComponent } from "./app.component";

import { IgxItemLegendModule, IgxDoughnutChartModule } from 'igniteui-angular-charts';

@NgModule({
bootstrap: [AppComponent],
declarations: [
AppComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
CommonModule,
FormsModule,
IgxItemLegendModule,
IgxDoughnutChartModule
],
providers: [],
schemas: []
})
export class AppModule {}
3 changes: 3 additions & 0 deletions tests/donut-ava4/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const environment = {
production: true
};
16 changes: 16 additions & 0 deletions tests/donut-ava4/src/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.

export const environment = {
production: false
};

/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
23 changes: 23 additions & 0 deletions tests/donut-ava4/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="utf-8">
<title>IgniteUI for Angular | Example | infragistics</title>
<base href="/">

<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://static.infragistics.com/xplatform/images/browsers/angular.ico" rel="icon" type="image/x-icon" >
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Titillium+Web:300,400,600,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
<link href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css" rel="stylesheet">
<link href="https://static.infragistics.com/xplatform/css/themes/light/bootstrap.css" rel="stylesheet">
<link href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" rel="stylesheet" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
</head>

<body class="igx-typography">
<app-root></app-root>
</body>

</html>
Loading