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
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export class DashboardGaugeDataSourceItem {
public constructor(init: Partial<DashboardGaugeDataSourceItem>) {
Object.assign(this, init);
}

public value: number;

}
export class DashboardGaugeDataSource extends Array<DashboardGaugeDataSourceItem> {
public constructor(items: Array<DashboardGaugeDataSourceItem> | number = -1) {
if (Array.isArray(items)) {
super(...items);
} else {
const newItems = [
new DashboardGaugeDataSourceItem(
{
value: 40
}),
];
super(...newItems.slice(0));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<igx-dashboard-tile
tileTitle="Sample Gauge"
name="dashboard"
#dashboard>
#dashboard
[dataSource]="dashboardGaugeDataSource">
</igx-dashboard-tile>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AfterViewInit, Component, ViewChild, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
import { DashboardGaugeDataSourceItem, DashboardGaugeDataSource } from './DashboardGaugeDataSource';
import { IgxDashboardTileComponent } from 'igniteui-angular-dashboards';

@Component({
Expand All @@ -14,21 +15,21 @@ export class AppComponent implements AfterViewInit

@ViewChild("dashboard", { static: true } )
private dashboard: IgxDashboardTileComponent
private _dashboardGaugeDataSource: DashboardGaugeDataSource = null;
public get dashboardGaugeDataSource(): DashboardGaugeDataSource {
if (this._dashboardGaugeDataSource == null)
{
this._dashboardGaugeDataSource = new DashboardGaugeDataSource();
}
return this._dashboardGaugeDataSource;
}

public constructor(private _detector: ChangeDetectorRef)
{
}

public ngAfterViewInit(): void
{
this.dashboardTileGaugeOnInit();
}

public dashboardTileGaugeOnInit(): void {

var target = this.dashboard;

target.dataSource = 40;
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<div class="options vertical">
<igx-property-editor-panel
[componentRenderer]="renderer"
[target]="angleAxis"
descriptionType="CategoryAngleAxis"
[target]="chart"
descriptionType="DataChart"
isHorizontal="true"
isWrappingEnabled="true"
name="propertyEditorPanel1"
#propertyEditorPanel1>
<igx-property-editor-property-description
propertyPath="LabelExtent"
propertyPath="Axes[0 as CategoryAngleAxis].LabelExtent"
name="LabelExtent"
#labelExtent
label="Label Extent"
Expand All @@ -21,7 +21,7 @@
step="1">
</igx-property-editor-property-description>
<igx-property-editor-property-description
propertyPath="LabelMode"
propertyPath="Axes[0 as CategoryAngleAxis].LabelMode"
name="LabelMode"
#labelMode
label="LabelMode"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18
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 samples/charts/data-chart/selection-matcher/.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 samples/charts/data-chart/selection-matcher/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
}
}
43 changes: 43 additions & 0 deletions samples/charts/data-chart/selection-matcher/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"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": "19.0.4",
"@angular/common": "19.0.4",
"@angular/compiler": "19.0.4",
"@angular/core": "19.0.4",
"@angular/forms": "19.0.4",
"@angular/platform-browser": "19.0.4",
"@angular/platform-browser-dynamic": "19.0.4",
"@types/hammerjs": "2.0.40",
"classlist.js": "1.1.20150312",
"hammerjs": "2.0.8",
"igniteui-angular-charts": "19.0.0",
"igniteui-angular-core": "19.0.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.15.0"
},
"devDependencies": {
"@angular/cli": "19.0.4",
"@angular/compiler-cli": "19.0.4",
"@angular/language-service": "19.0.4",
"@angular-devkit/build-angular": "19.0.4",
"@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",
"tslint": "~6.1.3",
"ts-node": "10.9.1",
"typescript": "5.6.3"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
export class EnergyRenewableConsumptionItem {
public constructor(init: Partial<EnergyRenewableConsumptionItem>) {
Object.assign(this, init);
}

public location: string;
public year: number;
public hydro: number;
public solar: number;
public wind: number;
public other: number;

}
export class EnergyRenewableConsumption extends Array<EnergyRenewableConsumptionItem> {
public constructor(items: Array<EnergyRenewableConsumptionItem> | number = -1) {
if (Array.isArray(items)) {
super(...items);
} else {
const newItems = [
new EnergyRenewableConsumptionItem(
{
location: `China`,
year: 2019,
hydro: 1269.5,
solar: 223,
wind: 405.2,
other: 102.8
}),
new EnergyRenewableConsumptionItem(
{
location: `Europe`,
year: 2019,
hydro: 632.54,
solar: 154,
wind: 461.3,
other: 220.3
}),
new EnergyRenewableConsumptionItem(
{
location: `USA`,
year: 2019,
hydro: 271.16,
solar: 108,
wind: 303.4,
other: 78.34
}),
new EnergyRenewableConsumptionItem(
{
location: `Brazil`,
year: 2019,
hydro: 399.3,
solar: 5.5,
wind: 55.83,
other: 56.25
}),
new EnergyRenewableConsumptionItem(
{
location: `Canada`,
year: 2019,
hydro: 381.98,
solar: 4.3,
wind: 34.17,
other: 10.81
}),
];
super(...newItems.slice(0));
}
}
}
Loading