Skip to content

Commit

Permalink
Adding changes from build igniteui-xplat-examples-output+PRs_2025.2.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tfsbuild committed Feb 6, 2025
1 parent 3e288f7 commit 4e72efe
Show file tree
Hide file tree
Showing 26 changed files with 1,054 additions and 13 deletions.
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));
}
}
}
21 changes: 14 additions & 7 deletions samples/charts/dashboard-tile/gauge-dashboard/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { IgcDashboardTileModule, IgcDataChartDashboardTileModule, IgcGeographicMapDashboardTileModule, IgcLinearGaugeDashboardTileModule, IgcPieChartDashboardTileModule, IgcRadialGaugeDashboardTileModule } from 'igniteui-webcomponents-dashboards';
import { IgcDashboardTileComponent } from 'igniteui-webcomponents-dashboards';
import { DashboardGaugeDataSourceItem, DashboardGaugeDataSource } from './DashboardGaugeDataSource';

import { ModuleManager } from 'igniteui-webcomponents-core';

Expand All @@ -17,19 +18,25 @@ ModuleManager.register(
export class Sample {

private dashboard: IgcDashboardTileComponent
private _bind: () => void;

constructor() {
var dashboard = this.dashboard = document.getElementById('dashboard') as IgcDashboardTileComponent;

this.dashboardTileGaugeOnInit();
}

this._bind = () => {
dashboard.dataSource = this.dashboardGaugeDataSource;
}
this._bind();

public dashboardTileGaugeOnInit(): void {

var target = this.dashboard;
}

target.dataSource = 40;
private _dashboardGaugeDataSource: DashboardGaugeDataSource = null;
public get dashboardGaugeDataSource(): DashboardGaugeDataSource {
if (this._dashboardGaugeDataSource == null)
{
this._dashboardGaugeDataSource = new DashboardGaugeDataSource();
}
return this._dashboardGaugeDataSource;
}

}
Expand Down
6 changes: 3 additions & 3 deletions samples/charts/data-chart/radial-label-mode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
<div class="options vertical">
<igc-property-editor-panel

description-type="CategoryAngleAxis"
description-type="DataChart"
is-horizontal="true"
is-wrapping-enabled="true"
name="propertyEditorPanel1"
id="propertyEditorPanel1">
<igc-property-editor-property-description
property-path="LabelExtent"
property-path="Axes[0 as CategoryAngleAxis].LabelExtent"
name="LabelExtent"
id="LabelExtent"
label="Label Extent"
Expand All @@ -38,7 +38,7 @@
step="1">
</igc-property-editor-property-description>
<igc-property-editor-property-description
property-path="LabelMode"
property-path="Axes[0 as CategoryAngleAxis].LabelMode"
name="LabelMode"
id="LabelMode"
label="LabelMode"
Expand Down
2 changes: 1 addition & 1 deletion samples/charts/data-chart/radial-label-mode/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class Sample {

this._bind = () => {
propertyEditorPanel1.componentRenderer = this.renderer;
propertyEditorPanel1.target = this.angleAxis;
propertyEditorPanel1.target = this.chart;
chart.legend = this.legend;
angleAxis.dataSource = this.footballPlayerStats;
radialColumnSeries1.dataSource = this.footballPlayerStats;
Expand Down
11 changes: 11 additions & 0 deletions samples/charts/data-chart/selection-matcher/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"printWidth": 250,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": false,
"trailingComma": "none",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"fluid": false
}
97 changes: 97 additions & 0 deletions samples/charts/data-chart/selection-matcher/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<!DOCTYPE html>
<html>
<head>
<title>Sample | Ignite UI | Web Components | infragistics</title>
<meta charset="UTF-8" />

<link rel="shortcut icon" href="https://static.infragistics.com/xplatform/images/browsers/wc.png" >
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Kanit&display=swap" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Titillium Web" />
<link rel="stylesheet" href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css" />
<link rel="stylesheet" href="/src/index.css" type="text/css" />

</head>

<body>
<div id="root">

<div class="container sample">

<div class="legend-title">
Renewable Energy Consumption
</div>

<div class="legend">
<igc-legend
name="legend"
id="legend"
orientation="Horizontal">
</igc-legend>
</div>

<div class="container fill">
<igc-data-chart
name="chart"
id="chart"
is-horizontal-zoom-enabled="false"
is-vertical-zoom-enabled="false"
selection-mode="SelectionColorFill"
selection-behavior="Auto"
selection-brush="orange">
<igc-category-y-axis
name="yAxis"
id="yAxis"
label="location"
is-inverted="true">
</igc-category-y-axis>
<igc-numeric-x-axis
name="xAxis"
id="xAxis"
minimum-value="0"
title="TWh">
</igc-numeric-x-axis>
<igc-stacked-100-bar-series
name="stacked100BarSeries"
id="stacked100BarSeries"
show-default-tooltip="true"
area-fill-opacity="1">
<igc-stacked-fragment-series
name="s1"
id="s1"
value-member-path="hydro"
title="Hydro">
</igc-stacked-fragment-series>
<igc-stacked-fragment-series
name="s2"
id="s2"
value-member-path="wind"
title="Wind">
</igc-stacked-fragment-series>
<igc-stacked-fragment-series
name="s3"
id="s3"
value-member-path="solar"
title="Solar">
</igc-stacked-fragment-series>
<igc-stacked-fragment-series
name="s4"
id="s4"
value-member-path="other"
title="Other">
</igc-stacked-fragment-series>
</igc-stacked-100-bar-series>
<igc-data-tool-tip-layer
name="dataToolTipLayer"
id="dataToolTipLayer">
</igc-data-tool-tip-layer>
</igc-data-chart>
</div>
</div>

</div>

<!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><script src="src/index.ts"></script><% } %>
</body>
</html>
57 changes: 57 additions & 0 deletions samples/charts/data-chart/selection-matcher/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "example-ignite-ui-web-components",
"description": "This project provides example of using Ignite UI for Web Components",
"author": "Infragistics",
"version": "1.0.0",
"license": "",
"private": true,
"homepage": ".",
"main": "src/index.ts",
"scripts": {
"build": "npm run build:prod",
"build:dev": "webpack --mode development --config ./webpack.config.js --progress --color --display-error-details",
"build:prod": "webpack --env.NODE_ENV=production --mode production --config ./webpack.config.js --progress --color --display-error-details --bail",
"serve:dev": "node --max-old-space-size=8192 node_modules/webpack-dev-server/bin/webpack-dev-server.js --mode development --config ./webpack.config.js --hot --progress --open",
"serve:prod": "webpack-dev-server --env.NODE_ENV=production --mode production --config ./webpack.config.js --port 3000 --host 0.0.0.0 --hot --progress --open --content-base dist/",
"start": "npm run serve:dev",
"build:legacy": "npm run build:prod:legacy",
"build:dev:legacy": "webpack --env.legacy=true --mode development --config ./webpack.config.js --progress --color --display-error-details",
"build:prod:legacy": "webpack --env.NODE_ENV=production --env.legacy=true --mode production --config ./webpack.config.js --progress --color --display-error-details --bail",
"serve:dev:legacy": "node --max-old-space-size=8192 node_modules/webpack-dev-server/bin/webpack-dev-server.js --env.legacy=true --mode development --config ./webpack.config.js --hot --progress --open",
"serve:prod:legacy": "webpack-dev-server --env.NODE_ENV=production --env.legacy=true --mode production --config ./webpack.config.js --port 3000 --host 0.0.0.0 --hot --progress --open --content-base dist/",
"start:legacy": "npm run serve:dev:legacy"
},
"dependencies": {
"babel-runtime": "^6.26.0",
"igniteui-webcomponents-charts": "5.2.0",
"igniteui-webcomponents-core": "5.2.0",
"lit-html": "^3.2.0",
"tslib": "^2.0.0"
},
"devDependencies": {
"@babel/cli": "^7.8.3",
"@babel/core": "^7.8.3",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.10.0",
"@babel/preset-env": "^7.8.3",
"@babel/preset-typescript": "^7.8.3",
"@types/source-map": "^0.5.7",
"babel-loader": "^8.1.0",
"babel-plugin-transform-custom-element-classes": "^0.1.0",
"css-loader": "^1.0.0",
"csv-loader": "^3.0.2",
"file-loader": "^4.2.0",
"fork-ts-checker-webpack-plugin": "^4.1.5",
"html-webpack-plugin": "^4.3.0",
"parcel-bundler": "^1.6.1",
"source-map": "^0.7.3",
"style-loader": "^0.22.1",
"tsconfig-paths-webpack-plugin": "^4.0.0",
"typescript": "^4.4.4",
"webpack": "^5.96.1",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1",
"worker-loader": "^3.0.8",
"xml-loader": "^1.2.1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"infiniteLoopProtection": false,
"hardReloadOnChange": false,
"view": "browser",
"template": "parcel"
}
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));
}
}
}
3 changes: 3 additions & 0 deletions samples/charts/data-chart/selection-matcher/src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* shared styles are loaded from: */
/* https://static.infragistics.com/xplatform/css/samples */

Loading

0 comments on commit 4e72efe

Please sign in to comment.