Skip to content

Commit 0fbce50

Browse files
authored
Merge pull request #1740 from IgniteUI/copilot/replace-geo-map-tutorial
[React] Replace Geo Map tutorial with IgrGrid in Getting Started documentation
2 parents 4a3999a + ad70de0 commit 0fbce50

File tree

4 files changed

+119
-126
lines changed

4 files changed

+119
-126
lines changed

doc/en/components/general-getting-started.md

Lines changed: 119 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -2,107 +2,145 @@
22
title: Getting Started | {ProductName} | Infragistics
33
_description: Use Infragistics' {Platform} components to create apps and improve data visualization with the world’s fastest, virtualized, real-time {Platform} data grid and streaming financial and business and financial charts.
44
_keywords: {ProductName}, Infragistics, Getting Started
5-
mentionedTypes: ["XamBulletGraph"]
5+
mentionedTypes: ["XamBulletGraph", "IgrGrid"]
66
---
77

8-
<!-- WebComponents -->
9-
# {ProductName} Packages Overview
8+
<!-- React -->
109

11-
{ProductName} is a complete set of UI widgets, components, UI kits for design tools and supporting services for Web Components. Designed to enable developers to build the most modern, high-performance HTML5 & JavaScript apps for modern desktop browsers, mobile experiences and progressive web apps (PWA’s) targeting the browsers web components APIs.
10+
# Getting Started With {ProductName}
1211

13-
<!-- end: WebComponents -->
12+
## Prerequisites
1413

15-
<!-- React -->
16-
## {ProductName} Packages Overview
14+
1. Install NodeJS.
15+
2. Install Visual Studio Code.
1716

18-
{ProductName} is a comprehensive suite of UI components, design toolkits, and supporting services for React. Built to empower developers to create modern, high-performance React applications for desktop browsers, mobile experiences, and progressive web apps (PWAs), {ProductName} leverages the latest React best practices and APIs.
17+
<div>
18+
<div style="display:inline-block;width:45%;text-align:center;">
19+
<img src="../images/general/nodejs.svg" alt="nodejs"
20+
style="display:flex;max-height:100px;margin:auto auto 20px auto;" />
21+
<a target="_blank" href="https://nodejs.org/en/download/" class="no-external-icon"
22+
style="color:white;background-color:#09f;text-decoration:none;font-weight:700;font-size:16px;padding: 5px 15px 5px 15px;">
23+
DOWNLOAD NODE
24+
</a>
25+
</div>
26+
<div style="display:inline-block;width:45%;text-align:center;">
27+
<img src="../images/general/vs-code.svg" alt="vs-code"
28+
style="display:flex;max-height:100px;margin:auto auto 20px auto;" />
29+
<a target="_blank" href="https://code.visualstudio.com/download" class="no-external-icon"
30+
style="color:white;background-color:#09f;text-decoration:none;font-weight:700;font-size:16px;padding: 5px 15px 5px 15px;">
31+
DOWNLOAD VS CODE
32+
</a>
33+
</div>
34+
</div>
1935

20-
<!-- end: React -->
36+
## Using Ignite UI CLI
2137

22-
<!-- WebComponents, React -->
38+
To create an application from scratch and configure it to use Ignite UI React you can use the Ignite UI CLI. The first step is to install the respective package globally as follows:
2339

24-
## Charts & Graphs
25-
{ProductName} contains a library of [Charts & Graphs](charts/chart-overview.md) that lets you visualize any type of data through its 65+ types of chart series and combinations into stunning and interactive charts and dashboards. Built for speed and beauty, designed to work on every modern browser and with complete touch and interactivity, you can quickly build responsive visuals on any device.
40+
```cmd
41+
npm install -g igniteui-cli
42+
```
2643

27-
## Gauges
28-
{ProductName} provides [Radial Gauge](radial-gauge.md), [Linear Gauge](linear-gauge.md), and [Bullet Graph](bullet-graph.md) components used to illustrate data in an easy and intuitive way. The [Radial Gauge](radial-gauge.md) has a variety of customization options in order to create a predefined shape and scale. The [Linear Gauge](linear-gauge.md) provides a simple view of a value compared against a scale and one or more ranges. It supports one scale, one set of tick marks and one set of labels. The [Bullet Graph](bullet-graph.md) component that lets you create data visualizations, replacing meters and gauges that are used on dashboards with simple bar charts.
44+
If you want to get a guided experience through the available options, you can initialize the step by step mode that will help you create and setup your new application. To start the guide, simply run the `ig` command:
2945

30-
## Maps
31-
{ProductName} [Geographic Maps](geo-map.md) brings the ability to visualize geographic data in your application. It can render data sets consisting of many geographic locations in shapes of markers, lines, polygons, or even interactive bitmaps. It allows you to overlay multiple map layers with geographic data, mark specific geographic locations and display information using custom markers and colors.
46+
```cmd
47+
ig
48+
```
3249

33-
## Grids & Inputs
34-
{ProductName} provides several [Grids](grids/grids-header.md) components that allows you to bind and display data with little configuration in form of [Data Grid](grids/data-grid.md), [List](grids/list.md), [Tree](grids/tree.md), and even [Spreadsheet](spreadsheet-overview.md). It also provides features such as filtering, sorting, grouping, pinning and more.
50+
Then choose `React` as framework, `Ignite UI for React TS` as type, select `Default Top Navigation` project template, add a specific component/view or select `Complete & Run`.
51+
For more information about the Ignite UI CLI, see the [CLI overview](general-cli-overview.md).
3552

36-
## Buttons, Inputs, Layouts & Menus
37-
{ProductName} provides various types of [Buttons](inputs/button.md), [Inputs](inputs/input.md), [Menus](menus/navbar.md), and [Layouts](layouts/tabs.md) that give you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach. See the [Storybook Here](https://igniteui.github.io/igniteui-webcomponents). These components are based on the [Indigo Design System](https://www.infragistics.com/products/appbuilder/ui-toolkit), are fully supported by [App Builder](https://appbuilder.indigo.design/) and are backed by ready-to-use UI kits for Sketch, Adobe XD and Figma.
53+
If you added a Grid component during the prompts, once the application is running you should see something similar to the following:
3854

39-
<!-- end: WebComponents, React -->
55+
<img src="../images/general/ig-cli-grid.png" />
4056

41-
<!-- React -->
57+
Alternatively, you can use popular frameworks such as Next.js, Vite or Expo as recommended by the React team. Following is a step-by-step instructions for creating React applications with Ignite UI React using one of these methods.
4258

43-
## Getting Started With {ProductName}
59+
## Using Vite CLI
4460

45-
## Install IgniteUI CLI
61+
### Creating a New React Project
62+
63+
All popular frameworks for React development provide powerful CLI tools for scaffolding a React application.
64+
65+
1 - Open **VS Code**, select **Terminal** menu and then **New Terminal** option.
4666

47-
To create an application from scratch and configure it to use the Ignite UI React you can use the Ignite UI CLI. The first step is to install the respective package globally as follows:
67+
2 - Type the following command in the terminal window:
4868

4969
```cmd
50-
npm install -g igniteui-cli
70+
npm create vite@latest
5171
```
5272

53-
If you want to get a guided experience through the available options, you can initialize the step by step mode that will help you create and setup your new application. To start the guide, simply run the `ig` command:
73+
Then follow the prompts to choose a name for the project, React as a platform to create the project for, whether to use Typescript or not and for various other options Vite provides. Please, refer to this <a href="https://react.dev/learn/creating-a-react-app" target="_blank">topic</a> for more information on the different ways to boilerplate a React application.
74+
75+
### Adding an Ignite UI React Grid Component
76+
77+
##### Package Installation
78+
To add the Ignite UI React [**Grid**](grids/data-grid.md) component to the app you need to install the `igniteui-react-grids` package:
5479

5580
```cmd
56-
ig
81+
npm install igniteui-react-grids --save
5782
```
5883

59-
Then choose React as framework, React TS as type, select **Default Top Navigation** project template, add a specific component/view or select `Complete & Run`.
60-
Additionally, you can read more about the Ignite UI CLI in this [topic](general-cli-overview.md).
84+
#### Importing Component Modules
6185

62-
Alternatively, you can use popular frameworks such as Next.js, Vite or Expo as recommended by the React team. Following is a step-by-step instructions for creating React applications with Ignite UI React using one of these methods.
86+
Then we can import the required modules of the components we want to use. Let's do this for the Grid and Column components that we will also use in the template. We also need to import one of the themes.
6387

64-
## Prerequisites
6588

66-
1. Install NodeJS.
67-
2. Install Visual Studio Code.
89+
```ts
90+
import { IgrGrid, IgrColumn } from 'igniteui-react-grids';
91+
import 'igniteui-react-grids/grids/themes/light/bootstrap.css';
92+
```
6893

69-
<div>
70-
<div style="display:inline-block;width:45%;text-align:center;">
71-
<img src="../images/general/nodejs.svg" alt="nodejs"
72-
style="display:flex;max-height:100px;margin:auto auto 20px auto;" />
73-
<a target="_blank" href="https://nodejs.org/en/download/" class="no-external-icon"
74-
style="color:white;background-color:#09f;text-decoration:none;font-weight:700;font-size:16px;padding: 5px 15px 5px 15px;">
75-
DOWNLOAD NODE
76-
</a>
77-
</div>
78-
<div style="display:inline-block;width:45%;text-align:center;">
79-
<img src="../images/general/vs-code.svg" alt="vs-code"
80-
style="display:flex;max-height:100px;margin:auto auto 20px auto;" />
81-
<a target="_blank" href="https://code.visualstudio.com/download" class="no-external-icon"
82-
style="color:white;background-color:#09f;text-decoration:none;font-weight:700;font-size:16px;padding: 5px 15px 5px 15px;">
83-
DOWNLOAD VS CODE
84-
</a>
85-
</div>
86-
</div>
94+
#### Using Components
95+
96+
We are now ready to use the {ProductName} grid component in our markup! Let's go ahead and define it:
8797

88-
## Creating New React Project
98+
```tsx
99+
// App.txs
100+
function App() {
101+
const data = [
102+
{ name: "John", age: 30 },
103+
{ name: "Jane", age: 25 },
104+
{ name: "Bob", age: 35 }
105+
];
89106

90-
With above prerequisites installed, we can create a new React application.
107+
return (
108+
<div style={{ height: "100%", width: "100%" }}>
109+
<IgrGrid
110+
data={data}
111+
autoGenerate={false}>
112+
<IgrColumn
113+
field="name"
114+
header="Name"
115+
dataType="string">
116+
</IgrColumn>
117+
<IgrColumn
118+
field="age"
119+
header="Age"
120+
dataType="number">
121+
</IgrColumn>
122+
</IgrGrid>
123+
</div>
124+
);
125+
}
126+
```
91127

92-
1 - Open **VS Code**, select **Terminal** menu and then **New Terminal** option.
128+
### Running Application
93129

94-
2 - Type one of these commands in terminal window:
130+
Finally, we can run our new application:
95131

96132
```cmd
97-
npx create-next-app@latest
133+
npm run dev
98134
```
99135

100-
Then follow the prompts to choose a name for the project, whether to use Typescript or not and for various other options React provides. For this example `npx` and `create-next-app` are required. Refer to this <a href="https://react.dev/learn/creating-a-react-app" target="_blank">topic</a> for more information on the different ways to boilerplate a React application.
136+
After executing this command, your project will be built and served locally on your computer. It will automatically open in your default browser and you will be able to use {ProductName} components in your project. The final result should show a data grid with sample data:
137+
138+
<img src="../images/general/ig-vite-grid.png" />
101139

102140
<!-- end: React -->
103141

104142
<!-- WebComponents -->
105-
## Getting Started With {ProductName}
143+
# Getting Started With {ProductName}
106144

107145
This section provides step-by-step instructions for creating Web Components application with Ignite UI for Web Components.
108146

@@ -346,7 +384,7 @@ npm run build
346384

347385
<!-- Angular, React -->
348386

349-
## Updating Existing App
387+
## Updating Existing Apps
350388

351389
If you want to use {ProductName} in an existing {Platform} CLI project (one that you have from before). We have you covered! All you have to do is execute these commands:
352390

@@ -373,81 +411,40 @@ yarn add {PackageSpreadsheet} {PackageCore}
373411

374412
This will automatically install packages for {ProductName}, along with all of their dependencies, font imports and styles references to the existing project.
375413

376-
## Importing Component Modules
377-
378-
First we have to import the required modules of the components we want to use. We will go ahead and do this for the [**GeographicMap**](geo-map.md) component.
379-
380-
381-
```razor
382-
builder.Services.AddIgniteUIBlazor(
383-
typeof(IgbGeographicMapModule),
384-
typeof(IgbDataChartInteractivityModule)
385-
);
386-
```
387-
388-
```ts
389-
import { IgrGeographicMapModule, IgrGeographicMap } from 'igniteui-react-maps';
390-
import { IgrDataChartInteractivityModule } from 'igniteui-react-charts';
391-
392-
IgrGeographicMapModule.register();
393-
IgrDataChartInteractivityModule.register();
394-
```
414+
<!-- end: Angular, React -->
395415

396-
```ts
397-
import { IgcGeographicMapModule } from 'igniteui-webcomponents-maps';
398-
import { IgcGeographicMapComponent } from 'igniteui-webcomponents-maps';
399-
import { IgcDataChartInteractivityModule } from 'igniteui-webcomponents-charts';
400-
import { ModuleManager } from 'igniteui-webcomponents-core';
416+
<!-- WebComponents -->
417+
# {ProductName} Packages Overview
401418

402-
ModuleManager.register(
403-
IgcGeographicMapModule,
404-
IgcDataChartInteractivityModule
405-
);
406-
```
419+
{ProductName} is a complete set of UI widgets, components, UI kits for design tools and supporting services for Web Components. Designed to enable developers to build the most modern, high-performance HTML5 & JavaScript apps for modern desktop browsers, mobile experiences and progressive web apps (PWA’s) targeting the browsers web components APIs.
407420

408-
## Using Components
421+
<!-- end: WebComponents -->
409422

410-
We are now ready to use the {ProductName} map component in our markup! Let's go ahead and define it:
423+
<!-- React -->
424+
# {ProductName} Packages Overview
411425

412-
```tsx
413-
// App.txs
414-
function App() {
415-
return (
416-
<div style={{ height: "100%", width: "100%" }}>
417-
<IgrGeographicMap
418-
width="800px"
419-
height="500px"
420-
zoomable="true" />
421-
</div>
422-
);
423-
}
424-
```
426+
{ProductName} is a comprehensive suite of UI components, design toolkits, and supporting services for React. Built to empower developers to create modern, high-performance React applications for desktop browsers, mobile experiences, and progressive web apps (PWAs), {ProductName} leverages the latest React best practices and APIs.
425427

426-
```html
427-
<div style="height: 100%, width: 100%">
428-
<igc-geographic-map
429-
width="800px"
430-
height="500px"
431-
zoomable="true">
432-
</igc-geographic-map>
433-
</div>
434-
```
428+
<!-- end: React -->
435429

436-
## Running Application
430+
<!-- WebComponents, React -->
437431

438-
Finally, we can run our new application by using one of the following commands:
432+
## Charts & Graphs
433+
{ProductName} contains a library of [Charts & Graphs](charts/chart-overview.md) that lets you visualize any type of data through its 65+ types of chart series and combinations into stunning and interactive charts and dashboards. Built for speed and beauty, designed to work on every modern browser and with complete touch and interactivity, you can quickly build responsive visuals on any device.
439434

440-
```cmd
441-
npm run-script start
442-
```
435+
## Gauges
436+
{ProductName} provides [Radial Gauge](radial-gauge.md), [Linear Gauge](linear-gauge.md), and [Bullet Graph](bullet-graph.md) components used to illustrate data in an easy and intuitive way. The [Radial Gauge](radial-gauge.md) has a variety of customization options in order to create a predefined shape and scale. The [Linear Gauge](linear-gauge.md) provides a simple view of a value compared against a scale and one or more ranges. It supports one scale, one set of tick marks and one set of labels. The [Bullet Graph](bullet-graph.md) component that lets you create data visualizations, replacing meters and gauges that are used on dashboards with simple bar charts.
443437

444-
After executing this command, your project will be built and served locally on your computer. It will automatically open in your default browser and you will be able to use {ProductName} components in your project. The final result should show interactive map of the world:
438+
## Maps
439+
{ProductName} [Geographic Maps](geo-map.md) brings the ability to visualize geographic data in your application. It can render data sets consisting of many geographic locations in shapes of markers, lines, polygons, or even interactive bitmaps. It allows you to overlay multiple map layers with geographic data, mark specific geographic locations and display information using custom markers and colors.
445440

446-
<!-- <img src="../images/general/geo-map.png" alt="geo-map" /> -->
441+
## Grids & Inputs
442+
{ProductName} provides several [Grids](grids/grids-header.md) components that allows you to bind and display data with little configuration in form of [Data Grid](grids/data-grid.md), [List](grids/list.md), [Tree](grids/tree.md), and even [Spreadsheet](spreadsheet-overview.md). It also provides features such as filtering, sorting, grouping, pinning and more.
447443

448-
`sample="/maps/geo-map/display-osm-imagery", height="750", alt="{Platform} Overview Example"`
444+
## Buttons, Inputs, Layouts & Menus
445+
{ProductName} provides various types of [Buttons](inputs/button.md), [Inputs](inputs/input.md), [Menus](menus/navbar.md), and [Layouts](layouts/tabs.md) that give you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach. See the [Storybook Here](https://igniteui.github.io/igniteui-webcomponents). These components are based on the [Indigo Design System](https://www.infragistics.com/products/appbuilder/ui-toolkit), are fully supported by [App Builder](https://appbuilder.indigo.design/) and are backed by ready-to-use UI kits for Sketch, Adobe XD and Figma.
449446

450-
<!-- end: Angular, React -->
447+
<!-- end: WebComponents, React -->
451448

452449
<!-- Blazor -->
453450
## Getting Started With {ProductName}
24.6 KB
Loading
32.9 KB
Loading

stats/docStats-React.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2240,7 +2240,6 @@
22402240
"https://staging.infragistics.com/products/ignite-ui-react/react/components/geo-map-display-heat-imagery"
22412241
],
22422242
"https://staging.infragistics.com/react-demos/samples/samples/maps/geo-map/display-osm-imagery": [
2243-
"https://staging.infragistics.com/products/ignite-ui-react/react/components/general-getting-started",
22442243
"https://staging.infragistics.com/products/ignite-ui-react/react/components/geo-map-display-osm-imagery"
22452244
],
22462245
"https://staging.infragistics.com/react-demos/samples/samples/maps/geo-map/navigation": [
@@ -2750,9 +2749,6 @@
27502749
"https://staging.infragistics.com/products/ignite-ui-react/react/components/excel-library-working-with-sparklines": [
27512750
"https://staging.infragistics.com/react-demos/samples/samples/excel/excel-library/working-with-sparklines"
27522751
],
2753-
"https://staging.infragistics.com/products/ignite-ui-react/react/components/general-getting-started": [
2754-
"https://staging.infragistics.com/react-demos/samples/samples/maps/geo-map/display-osm-imagery"
2755-
],
27562752
"https://staging.infragistics.com/products/ignite-ui-react/react/components/geo-map": [
27572753
"https://staging.infragistics.com/react-demos/samples/samples/maps/geo-map/type-scatter-bubble-series"
27582754
],

0 commit comments

Comments
 (0)