Skip to content
Closed
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,4 @@
{
"name": "Node.js",
"image": "mcr.microsoft.com/devcontainers/javascript-node:22"
}
78 changes: 78 additions & 0 deletions samples/gauges/linear-gauge/labels/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project
module.exports = {
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
parserOptions: {
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: "module", // Allows for the use of imports
ecmaFeatures: {
jsx: true // Allows for the parsing of JSX
}
},
settings: {
react: {
version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use
}
},
extends: [
"eslint:recommended",
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
"plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin
],
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
"default-case": "off",
"jsx-a11y/alt-text": "off",
"jsx-a11y/iframe-has-title": "off",
"no-undef": "off",
"no-unused-vars": "off",
"no-extend-native": "off",
"no-throw-literal": "off",
"no-useless-concat": "off",
"no-mixed-operators": "off",
"no-prototype-builtins": "off",
"no-mixed-spaces-and-tabs": 0,
"prefer-const": "off",
"prefer-rest-params": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-useless-constructor": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/prefer-namespace-keyword": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
"default-case": "off",
"jsx-a11y/alt-text": "off",
"jsx-a11y/iframe-has-title": "off",
"no-var": "off",
"no-undef": "off",
"no-unused-vars": "off",
"no-extend-native": "off",
"no-throw-literal": "off",
"no-useless-concat": "off",
"no-mixed-operators": "off",
"no-mixed-spaces-and-tabs": 0,
"no-prototype-builtins": "off",
"prefer-const": "off",
"prefer-rest-params": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-useless-constructor": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/prefer-namespace-keyword": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
}
}
]
};
50 changes: 0 additions & 50 deletions samples/gauges/linear-gauge/labels/README.md

This file was deleted.

5 changes: 3 additions & 2 deletions samples/gauges/linear-gauge/labels/index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>LinearGaugeLabels</title>
<link href="https://dl.infragistics.com/x/css/samples/shared.v8.css" rel="stylesheet" />
<title>Sample | Ignite UI | React | infragistics</title>
<link rel="shortcut icon" href="https://dl.infragistics.com/x/img/browsers/react.png" >
<link rel="stylesheet" href="https://dl.infragistics.com/x/css/samples/shared.v8.css" />
</head>
<body>
<div id="root"></div>
Expand Down
42 changes: 25 additions & 17 deletions samples/gauges/linear-gauge/labels/package.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
{
"name": "react-linear-gauge-labels",
"description": "This project provides example of Linear Gauge Labels using Infragistics React components",
"name": "example-ignite-ui-react",
"description": "This project provides example of using Ignite UI for React components",
"author": "Infragistics",
"homepage": ".",
"version": "1.4.0",
"license": "",
"homepage": ".",
"private": true,
"scripts": {
"start": "vite --port 4200",
"build": "tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite build",
"preview": "vite preview",
"test": "vitest"
"test": "vitest",
"lint": "eslint ./src/**/*.{ts,tsx}"
},
"dependencies": {
"igniteui-react-core": "19.6.0",
"igniteui-react-gauges": "19.6.0",
"react": "^19.3.0",
"react-dom": "^19.3.0",
"igniteui-react-core": "19.6.0-beta.2",
"igniteui-react": "^19.9.0",
"igniteui-react-gauges": "19.6.0-beta.2",
"igniteui-webcomponents": "^7.4.1",
"lit-html": "^3.2.0",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"tslib": "^2.4.0"
},
"devDependencies": {
"@types/jest": "^30.0.0",
"@types/jest": "^29.2.0",
"@types/node": "^24.7.1",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@vitejs/plugin-react": "^6.1.1",
"@vitest/browser": "^5.0.2",
"typescript": "^5.9.3",
"vite": "^8.3.1",
"vitest": "^5.0.2",
"vitest-canvas-mock": "^1.2.0",
"@types/react": "^18.0.24",
"@types/react-dom": "^18.0.8",
"@vitejs/plugin-react": "^5.0.4",
"@vitest/browser": "^3.2.4",
"eslint": "^8.33.0",
"eslint-config-react": "^1.1.7",
"eslint-plugin-react": "^7.20.0",
"typescript": "^4.8.4",
"vite": "^7.1.9",
"vitest": "^3.2.4",
"vitest-canvas-mock": "^0.3.3",
"worker-loader": "^3.0.8"
},
"browserslist": [
Expand Down
5 changes: 5 additions & 0 deletions samples/gauges/linear-gauge/labels/sandbox.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"infiniteLoopProtection": false,
"hardReloadOnChange": false,
"view": "browser"
}
1 change: 1 addition & 0 deletions samples/gauges/linear-gauge/labels/src/SampleData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
2 changes: 2 additions & 0 deletions samples/gauges/linear-gauge/labels/src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* shared styles are loaded from: */
/* https://dl.infragistics.com/x/css/samples/shared.v8.css */
64 changes: 47 additions & 17 deletions samples/gauges/linear-gauge/labels/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,62 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import { IgrLinearGauge } from 'igniteui-react-gauges';

import { IgrLinearGaugeModule } from 'igniteui-react-gauges';
import { IgrLinearGauge } from 'igniteui-react-gauges';


IgrLinearGaugeModule.register();
const mods: any[] = [
IgrLinearGaugeModule
];
mods.forEach((m) => m.register());

export default class LinearGaugeLabels extends React.Component {

export default class Sample extends React.Component<any, any> {
private gauge: IgrLinearGauge
private gaugeRef(r: IgrLinearGauge) {
this.gauge = r;
this.setState({});
}

constructor(props: any) {
super(props);

this.gaugeRef = this.gaugeRef.bind(this);
}

public render(): JSX.Element {
return (
<div className="container sample">
<IgrLinearGauge
height="80px"
width="100%"
minimumValue={0} value={50}
maximumValue={100} interval={10}
labelInterval={10}
labelExtent={0.025}
labelsPreTerminal={0}
labelsPostInitial={0}
fontBrush="DodgerBlue"
font="11px Verdana" />
<div className="container sample">



<div className="container fill">
<IgrLinearGauge
ref={this.gaugeRef}
height="80px"
width="400px"
minimumValue="0"
value="55"
maximumValue="100"
interval="10"
labelInterval="10"
labelExtent="0.025"
labelsPreTerminal="0"
labelsPostInitial="0"
fontBrush="dodgerblue"
font="11px Verdana">
</IgrLinearGauge>
</div>
</div>
);
}



}

// rendering above class to the React DOM

// rendering above component in the React DOM
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<LinearGaugeLabels/>);
root.render(<Sample/>);
Loading