@igniteui/angular-templates 21.1.14100-alpha.2 → 21.1.14100-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-components/SKILL.md +68 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-components/references/charts.md +457 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-components/references/data-display.md +360 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-components/references/directives.md +272 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-components/references/feedback.md +149 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-components/references/form-controls.md +313 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-components/references/layout-manager.md +420 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-components/references/layout.md +225 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-components/references/setup.md +166 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-grids/SKILL.md +110 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-grids/references/data-operations.md +445 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-grids/references/editing.md +491 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-grids/references/features.md +234 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-grids/references/paging-remote.md +397 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-grids/references/state.md +314 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-grids/references/structure.md +299 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-grids/references/types.md +507 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-theming/SKILL.md +439 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-theming/references/common-patterns.md +45 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-theming/references/contributing.md +471 -0
- package/igx-ts/projects/_base/files/__dot__claude/skills/igniteui-angular-theming/references/mcp-setup.md +77 -0
- package/igx-ts/projects/_base/files/__dot__vscode/mcp.json +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: igniteui-angular-components
|
|
3
|
+
description: "Covers all non-grid Ignite UI for Angular UI components: application scaffolding and setup, form controls (inputs, combos, selects, date/time pickers, calendar, checkbox, radio, switch, slider), layout containers (tabs, stepper, accordion, splitter, navigation drawer), data-display components (list, tree, card, chips, carousel, paginator, progress indicators, chat), feedback overlays (dialog, snackbar, toast, banner), directives (button, icon button, button group, ripple, tooltip, drag-and-drop), Dock Manager, Layout Manager, and Charts. Use when users ask about any Ignite UI Angular component that is NOT a data grid — such as forms, dropdowns, pickers, dialogs, navigation, lists, trees, cards, charts, or initial project setup. Do NOT use for data grids, tables, or tabular data — use igniteui-angular-grids instead. Do NOT use for theming or styling — use igniteui-angular-theming instead."
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Ignite UI for Angular — UI Components
|
|
8
|
+
|
|
9
|
+
## MANDATORY AGENT PROTOCOL — YOU MUST FOLLOW THIS BEFORE PRODUCING ANY OUTPUT
|
|
10
|
+
|
|
11
|
+
**This file is a routing hub only. It contains NO code examples and NO API details.**
|
|
12
|
+
|
|
13
|
+
> **DO NOT write any component selectors, import paths, input names, output names, or directive names from memory.**
|
|
14
|
+
> Component APIs change between versions. Anything generated without reading the reference files will be incorrect.
|
|
15
|
+
|
|
16
|
+
You are **required** to complete ALL of the following steps before producing any component-related code or answer:
|
|
17
|
+
|
|
18
|
+
**STEP 1 — Identify every component or feature involved.**
|
|
19
|
+
Map the user's request to one or more rows in the Task → Reference File table below. A single request often spans multiple categories (e.g., a form inside a Dialog requires reading both `form-controls.md` AND `feedback.md`).
|
|
20
|
+
|
|
21
|
+
**STEP 2 — Read every identified reference file in full (PARALLEL).**
|
|
22
|
+
Call `read_file` (or equivalent) on **all** reference files identified in Step 1 **in a single parallel batch** — do NOT read them one at a time sequentially. You must do this even if you believe you already know the answer. Do not skip, skim, or partially read a reference file.
|
|
23
|
+
|
|
24
|
+
**STEP 3 — Only then produce output.**
|
|
25
|
+
Base your code and explanation exclusively on what you read. If the reference files do not cover something, say so explicitly rather than guessing.
|
|
26
|
+
|
|
27
|
+
### Task → Reference File
|
|
28
|
+
|
|
29
|
+
| Task | Reference file to read |
|
|
30
|
+
|---|---|
|
|
31
|
+
| App setup, `app.config.ts` providers, `provideAnimations()`, entry-point imports, convenience directive arrays | [`references/setup.md`](./references/setup.md) |
|
|
32
|
+
| Input Group, Combo, Simple Combo, Select, Date Picker, Date Range Picker, Time Picker, Calendar, Checkbox, Radio, Switch, Slider, reactive/template-driven forms | [`references/form-controls.md`](./references/form-controls.md) |
|
|
33
|
+
| Tabs, Bottom Navigation, Stepper, Accordion, Expansion Panel, Splitter, Navigation Drawer | [`references/layout.md`](./references/layout.md) |
|
|
34
|
+
| List, Tree, Card, Chips, Avatar, Badge, Icon, Carousel, Paginator, Progress Indicators, Chat | [`references/data-display.md`](./references/data-display.md) |
|
|
35
|
+
| Dialog, Snackbar, Toast, Banner | [`references/feedback.md`](./references/feedback.md) |
|
|
36
|
+
| Button, Icon Button, Button Group, Ripple, Tooltip, Drag and Drop | [`references/directives.md`](./references/directives.md) |
|
|
37
|
+
| Layout Manager (`igxLayout`, `igxFlex` directives), Dock Manager (`igc-dockmanager` web component) | [`references/layout-manager.md`](./references/layout-manager.md) |
|
|
38
|
+
| Charts (Area, Bar, Column, Stock/Financial, Pie), chart configuration, chart features (animation, tooltips, markers, highlighting, zooming), data binding | [`references/charts.md`](./references/charts.md) |
|
|
39
|
+
|
|
40
|
+
> **When in doubt, read more rather than fewer reference files.** The cost of an unnecessary file read is negligible; the cost of hallucinated API usage is a broken application.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Prerequisites
|
|
45
|
+
|
|
46
|
+
- Angular 20+ project
|
|
47
|
+
- `@angular/cli` installed
|
|
48
|
+
- `igniteui-angular` or `@infragistics/igniteui-angular` added to the project via `ng add igniteui-angular` (or the `@infragistics` variant) or `npm install` — see [Package Variants](#package-variants) below.
|
|
49
|
+
- A theme applied to the application (see [`igniteui-angular-theming`](../igniteui-angular-theming/SKILL.md)).
|
|
50
|
+
- `provideAnimations()` in `app.config.ts` — **required before using any overlay or animated component**
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## Package Variants
|
|
54
|
+
|
|
55
|
+
| Package | Install | Who uses it |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| `igniteui-angular` | `npm install igniteui-angular` | Open-source / community |
|
|
58
|
+
| `@infragistics/igniteui-angular` | Requires private `@infragistics` registry | Licensed / enterprise users |
|
|
59
|
+
|
|
60
|
+
Both packages share **identical entry-point paths**. Check `package.json` and use that package name as the prefix for every import. Never import from the root barrel of either package.
|
|
61
|
+
Both packages can be added to the project using `@angular/cli` with the following commands: `ng add igniteui-angular` or `ng add @infragistics/igniteui-angular`.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Related Skills
|
|
66
|
+
|
|
67
|
+
- [`igniteui-angular-grids`](../igniteui-angular-grids/SKILL.md) — Data Grids (Flat Grid, Tree Grid, Hierarchical Grid, Pivot Grid, Grid Lite)
|
|
68
|
+
- [`igniteui-angular-theming`](../igniteui-angular-theming/SKILL.md) — Theming & Styling
|
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
# Angular Charts Reference
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- [Overview](#overview)
|
|
6
|
+
- [General Chart Configuration](#general-chart-configuration)
|
|
7
|
+
- [Key Chart Features](#key-chart-features)
|
|
8
|
+
- [Chart Types Reference](#chart-types-reference)
|
|
9
|
+
- [Common API Members by Chart Type](#common-api-members-by-chart-type)
|
|
10
|
+
- [Import Paths](#import-paths)
|
|
11
|
+
- [Styling & Theming](#styling--theming)
|
|
12
|
+
- [Data Requirements](#data-requirements)
|
|
13
|
+
- [Documentation References](#documentation-references)
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
Ignite UI for Angular Charts provides 65+ chart types for data visualization. Charts are packaged separately in `igniteui-angular-charts` (or `@infragistics/igniteui-angular-charts` for licensed users).
|
|
18
|
+
|
|
19
|
+
### Chart Component packages
|
|
20
|
+
- `igniteui-angular-charts` — Category Chart, Financial Chart, Data Chart, and Pie Chart components (NPM)
|
|
21
|
+
- `@infragistics/igniteui-angular-charts` — Licensed version with same API (ProGet)
|
|
22
|
+
|
|
23
|
+
### Main Chart Components
|
|
24
|
+
|
|
25
|
+
> **IMPORTANT — Not Standalone Components**: Chart components from `igniteui-angular-charts` are **NOT** Angular standalone components (they predate the standalone API). They must always be imported via their **NgModule**. Standalone Angular components (Angular 14+) can still import NgModules directly in their `imports` array — this is fully supported.
|
|
26
|
+
|
|
27
|
+
| Component | NgModule to import | Description |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| `IgxCategoryChartComponent` | `IgxCategoryChartModule` | Simplified API for area, bar, column charts |
|
|
30
|
+
| `IgxFinancialChartComponent` | `IgxFinancialChartModule` | Stock/candlestick charts with OHLC data |
|
|
31
|
+
| `IgxDataChartComponent` | `IgxDataChartModule` | Advanced: explicit axes, series, >65 chart types |
|
|
32
|
+
| `IgxPieChartComponent` | `IgxPieChartModule` | Part-to-whole pie and donut charts |
|
|
33
|
+
| `IgxDataPieChartComponent` | `IgxDataPieChartModule` | Simplified API for pie charts |
|
|
34
|
+
| `IgxLegendComponent` | `IgxLegendModule` | Shared legend component |
|
|
35
|
+
|
|
36
|
+
### When to use each:
|
|
37
|
+
- **Category Chart** → Use for simple area/bar/column; let framework auto-configure
|
|
38
|
+
- **Financial Chart** → Use for stock data with time-series OHLC, indicators, volume
|
|
39
|
+
- **Data Chart** → Use for advanced scenarios: multiple axes, custom series combinations, stacked/scatter
|
|
40
|
+
- **Pie Chart** → Use for part-to-whole (segments sum to 100%)
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## General Chart Configuration
|
|
45
|
+
|
|
46
|
+
### Data Binding
|
|
47
|
+
```typescript
|
|
48
|
+
// Category Chart uses 'dataSource' to bind data (auto-detects numeric fields)
|
|
49
|
+
chartComponent.dataSource = [
|
|
50
|
+
{ month: 'Jan', revenue: 5000 },
|
|
51
|
+
{ month: 'Feb', revenue: 6500 }
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
// Data Chart uses 'itemsSource' and explicit series configuration
|
|
55
|
+
chartComponent.itemsSource = dataArray;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Chart Type Selection
|
|
59
|
+
- **Category Chart**: `chartType` property (Area, Bar, Column, Line, etc.)
|
|
60
|
+
- **Financial Chart**: `chartType` property (Line, Candlestick, OHLC Bar)
|
|
61
|
+
- **Data Chart**: Configure explicit series (IgxAreaSeriesComponent, IgxBarSeriesComponent, etc.)
|
|
62
|
+
- **Pie Chart**: No chartType needed; inherent pie structure
|
|
63
|
+
|
|
64
|
+
### Required Properties
|
|
65
|
+
|
|
66
|
+
**IgxCategoryChartComponent** (simplest API; auto-detects numeric & string columns):
|
|
67
|
+
- `dataSource` — Data array (required)
|
|
68
|
+
- `chartType` — Chart type (Area, Bar, Column, Line, etc.)
|
|
69
|
+
- Component auto-detects: first string column → X-axis labels, numeric columns → Y-axis data
|
|
70
|
+
|
|
71
|
+
**IgxDataChartComponent** (advanced; requires explicit configuration):
|
|
72
|
+
- `itemsSource` — Data array (required)
|
|
73
|
+
- `valueMemberPath` — Which property contains numeric values (for series)
|
|
74
|
+
- Requires explicit axis and series components
|
|
75
|
+
|
|
76
|
+
**IgxFinancialChartComponent** (stock data):
|
|
77
|
+
- `dataSource` — Data array with date + OHLC columns
|
|
78
|
+
- `openMemberPath`, `highMemberPath`, `lowMemberPath`, `closeMemberPath` — OHLC field names
|
|
79
|
+
|
|
80
|
+
**IgxPieChartComponent**:
|
|
81
|
+
- `dataSource` — Data array
|
|
82
|
+
- `labelMemberPath` — Field with category labels
|
|
83
|
+
- `valueMemberPath` — Field with numeric values
|
|
84
|
+
|
|
85
|
+
### Responsive & Sizing
|
|
86
|
+
- Charts auto-resize with container
|
|
87
|
+
- Set height/width on chart container (div, flexbox parent)
|
|
88
|
+
- Use CSS for responsive behavior
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Key Chart Features
|
|
93
|
+
|
|
94
|
+
### Axis Configuration
|
|
95
|
+
- **X-Axis**: Category (string/date) or Numeric (scatter/financial)
|
|
96
|
+
- **Y-Axis**: Always numeric
|
|
97
|
+
- Properties: `xAxisTitle`, `yAxisTitle`, `xAxisInterval`, `yAxisMinimumValue`, `yAxisMaximumValue`
|
|
98
|
+
- Gridlines: `xAxisMajorStroke`, `yAxisMajorStroke`, gridline styling
|
|
99
|
+
|
|
100
|
+
### Tooltips
|
|
101
|
+
- **Default tooltips**: Auto-enabled; style with `toolTipType` (Category, Item, etc.)
|
|
102
|
+
- **Custom tooltips**: `tooltipTemplate` directive for custom content
|
|
103
|
+
- Properties: `showDefaultTooltip`, `toolTipBrush` (color)
|
|
104
|
+
|
|
105
|
+
### Markers & Data Points
|
|
106
|
+
- Control marker visibility and style via `markerTypes`, `markerBrushes`, `markerOutlines`
|
|
107
|
+
- Properties: `markerSize`, `markerShape` (Circle, Square, Triangle, etc.)
|
|
108
|
+
- Use marker templates for custom marker appearance
|
|
109
|
+
|
|
110
|
+
### Animations
|
|
111
|
+
- Enable with `transitionInMode` (Auto, None, FromZero, FromSeries, etc.)
|
|
112
|
+
- Control speed via `transitionDuration` (milliseconds)
|
|
113
|
+
- Works on initial load and data updates
|
|
114
|
+
|
|
115
|
+
### Highlighting & Selection
|
|
116
|
+
- **Highlighting**: Mouse hover effect; set `highlightingMode`, `highlightingBehavior`
|
|
117
|
+
- **Selection**: Click to select data points/series; properties vary by chart type
|
|
118
|
+
|
|
119
|
+
### Zooming & Panning
|
|
120
|
+
- Mouse wheel to zoom; drag to pan
|
|
121
|
+
- Properties: `isHorizontalZoomEnabled`, `isVerticalZoomEnabled`
|
|
122
|
+
- Keyboard support: Arrow keys, +/- for zoom
|
|
123
|
+
|
|
124
|
+
### Trendlines
|
|
125
|
+
- Visualize data trends with trendline types (Linear, Logarithmic, Exponential, etc.)
|
|
126
|
+
- Property: `trendLineType` (Category/Financial charts)
|
|
127
|
+
|
|
128
|
+
### Legend
|
|
129
|
+
- Display with `legend` property (assign `IgxLegendComponent`)
|
|
130
|
+
- `legendItemTemplate` for custom legend items
|
|
131
|
+
- Properties: `showLegend`, `legendOrientation`, `legendPosition`
|
|
132
|
+
|
|
133
|
+
### Annotations
|
|
134
|
+
- **Crosshairs**: `crosshairsDisplayMode` (None, Vertical, Horizontal, Both)
|
|
135
|
+
- **Final Value Layer**: Show ending values on axis
|
|
136
|
+
- **Callout Layer**: Custom callouts at specific values
|
|
137
|
+
- **Range Annotations**: Highlight data ranges
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Chart Types Reference
|
|
142
|
+
|
|
143
|
+
### Area Chart (`IgxCategoryChartComponent`, `chartType: 'Area'`)
|
|
144
|
+
- **Use**: Trends over time, cumulative part-to-whole
|
|
145
|
+
- **Data**: X-axis categories, Y-axis numeric values
|
|
146
|
+
- **Variants**: Area, StepArea, Stacked Area, Stacked 100% Area
|
|
147
|
+
- **API**: `chartType`, `valueMemberPath`, `categoryXAxis`
|
|
148
|
+
- **Best Practices**:
|
|
149
|
+
- Start Y-axis at 0 for accuracy
|
|
150
|
+
- Use transparent colors for overlaid series
|
|
151
|
+
- Order time-series left to right
|
|
152
|
+
- **Avoid**: More than 7-10 series (readability), when data values are similar (overlap)
|
|
153
|
+
|
|
154
|
+
### Bar Chart (`IgxDataChartComponent`, `IgxBarSeriesComponent`)
|
|
155
|
+
- **Use**: Compare categories, show rankings, time-series changes
|
|
156
|
+
- **Data**: X-axis numeric, Y-axis categories (reversed from Column)
|
|
157
|
+
- **Variants**: Grouped Bar, Stacked Bar, Stacked 100% Bar, Polar Bar
|
|
158
|
+
- **API**: `IgxBarSeriesComponent`, `valueMemberPath`, `argumentMemberPath`
|
|
159
|
+
- **Best Practices**:
|
|
160
|
+
- Start numeric axis at 0
|
|
161
|
+
- Sort categories by value (ascending/descending)
|
|
162
|
+
- Right-align Y-axis labels
|
|
163
|
+
- **Avoid**: Too much data (axis becomes illegible), Time-series detail (use Line instead)
|
|
164
|
+
|
|
165
|
+
### Column Chart (`IgxCategoryChartComponent`, `chartType: 'Column'`)
|
|
166
|
+
- **Use**: Compare categories, show distribution, time-series changes
|
|
167
|
+
- **Data**: X-axis categories, Y-axis numeric values
|
|
168
|
+
- **Variants**: Column, StackedColumn, Stacked100%Column, RangeColumn, WaterfallColumn
|
|
169
|
+
- **API**: `chartType`, `valueMemberPath`, `categoryXAxis`
|
|
170
|
+
- **Best Practices**:
|
|
171
|
+
- Start Y-axis at 0
|
|
172
|
+
- Order time-series left to right
|
|
173
|
+
- **Avoid**: Many series (>10) side-by-side (readability)
|
|
174
|
+
- **Related**: Bar Chart (same but horizontal), Waterfall (show differences between values)
|
|
175
|
+
|
|
176
|
+
### Stock Chart (`IgxFinancialChartComponent`)
|
|
177
|
+
- **Use**: Financial/OHLC data analysis, candlestick visualization, technical indicators
|
|
178
|
+
- **Data Structure**:
|
|
179
|
+
- **Required**: Date/time column, numeric value column(s)
|
|
180
|
+
- **For Candlestick**: Open, High, Low, Close (4 numeric columns)
|
|
181
|
+
- **With Volume**: Open, High, Low, Close, Volume (5 numeric columns)
|
|
182
|
+
- **Display Modes**:
|
|
183
|
+
- **Price Pane**: Show candlestick, OHLC bar, line (configurable via `chartType`)
|
|
184
|
+
- **Volume Pane**: Show trading volume (column, line, or area chart)
|
|
185
|
+
- **Indicator Pane**: Financial indicators (RSI, MACD, Bollinger Bands, etc.)
|
|
186
|
+
- **Zoom Pane**: Navigation slider to zoom/pan
|
|
187
|
+
- **Chart Types**: `Line`, `Candlestick` (default), `OHLC Bar`, `Column`
|
|
188
|
+
- **API**:
|
|
189
|
+
- `chartType` — Price display type (Line, Candlestick, OHLC, Column — default Auto)
|
|
190
|
+
- `volumeType` — Volume display (None, Column, Line, Area)
|
|
191
|
+
- `indicatorTypes` — Array of indicators (0 or more)
|
|
192
|
+
- `zoomSliderType` — Zoom pane display (defaults to match chartType)
|
|
193
|
+
- **Indicators**: RSI, MACD, Bollinger Bands, Force Index, Standard Deviation, and more
|
|
194
|
+
- **Features**:
|
|
195
|
+
- Crosshairs with value snapshots
|
|
196
|
+
- Trendlines and overlays
|
|
197
|
+
- Time-based filters (users can select 1M, 3M, 6M, YTD, 1Y, ALL)
|
|
198
|
+
- **Data Binding**:
|
|
199
|
+
- `openMemberPath`, `highMemberPath`, `lowMemberPath`, `closeMemberPath`, `volumeMemberPath`
|
|
200
|
+
- `dateMemberPath` — Date/time column
|
|
201
|
+
|
|
202
|
+
### Pie Chart (`IgxPieChartComponent` or `IgxDataPieChartComponent`)
|
|
203
|
+
- **Use**: Part-to-whole visualization (segments sum to 100%)
|
|
204
|
+
- **Data**: Category labels, numeric values
|
|
205
|
+
- **Variants**: Pie, Donut (ring), Radial Pie
|
|
206
|
+
- **API**:
|
|
207
|
+
- `labelMemberPath` — Data property for slice labels
|
|
208
|
+
- `valueMemberPath` — Data property for numeric values
|
|
209
|
+
- `legend` — Assign IgxLegendComponent for legend display
|
|
210
|
+
- `selectionMode` — Single, Multiple, Manual (default Single)
|
|
211
|
+
- `othersCategoryThreshold` — Combine small slices into "Others"
|
|
212
|
+
- `othersCategoryType` — Threshold as Number or Percent
|
|
213
|
+
- `allowSliceExplosion` — Enable click to expand slice
|
|
214
|
+
- `allowSliceSelection` — Enable click selection highlighting
|
|
215
|
+
- **Features**:
|
|
216
|
+
- Slice explosion (separate a slice from pie)
|
|
217
|
+
- Slice selection (single or multiple)
|
|
218
|
+
- Legends with custom item templates
|
|
219
|
+
- Animation on load
|
|
220
|
+
- "Others" category for small segments
|
|
221
|
+
- **Best Practices**:
|
|
222
|
+
- Use for small data sets (6-8 segments max)
|
|
223
|
+
- Arrange largest to smallest (clockwise from 12 o'clock)
|
|
224
|
+
- Ensure segments sum to 100%
|
|
225
|
+
- Use distinguishable colors
|
|
226
|
+
- **Avoid**: Many segments (>8), change over time (use Bar/Line instead), precise comparisons (Bar is better)
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Common API Members by Chart Type
|
|
231
|
+
|
|
232
|
+
### IgxCategoryChartComponent (Area, Bar, Column, Line, etc.)
|
|
233
|
+
```typescript
|
|
234
|
+
// Required
|
|
235
|
+
dataSource: any[]; // Data array (auto-detects numeric fields)
|
|
236
|
+
chartType: ChartType; // Area, Bar, Column, Line, Waterfall, etc.
|
|
237
|
+
|
|
238
|
+
// Common optional inputs
|
|
239
|
+
xAxisTitle: string; // X-axis label
|
|
240
|
+
yAxisTitle: string; // Y-axis label
|
|
241
|
+
xAxisLabelLocation: AxisLabelLocation; // Axis label alignment
|
|
242
|
+
yAxisLabelLocation: AxisLabelLocation;
|
|
243
|
+
yAxisMinimumValue: number; // Y-axis minimum
|
|
244
|
+
yAxisMaximumValue: number; // Y-axis maximum
|
|
245
|
+
brushes: string[]; // Series colors (fill)
|
|
246
|
+
outlines: string[]; // Series colors (outline)
|
|
247
|
+
markerTypes: MarkerType[]; // Marker shapes (Circle, Square, etc.)
|
|
248
|
+
markerBrushes: string[]; // Marker fill colors
|
|
249
|
+
markerOutlines: string[]; // Marker outline colors
|
|
250
|
+
toolTipType: ToolTipType; // Tooltip display mode
|
|
251
|
+
highlightingMode: HighlightingMode; // Hover highlight behavior
|
|
252
|
+
highlightingBehavior: HighlightingBehavior;
|
|
253
|
+
trendLineType: TrendLineType; // Trendline visualization
|
|
254
|
+
transitionInMode: TransitionInMode; // Animation on load
|
|
255
|
+
transitionInDuration: number; // Animation duration (milliseconds)
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### IgxFinancialChartComponent (Stock/Candlestick/OHLC)
|
|
259
|
+
```typescript
|
|
260
|
+
chartType: FinancialChartType; // Line, Candlestick, OHLC, Column
|
|
261
|
+
itemsSource: any[];
|
|
262
|
+
openMemberPath: string;
|
|
263
|
+
highMemberPath: string;
|
|
264
|
+
lowMemberPath: string;
|
|
265
|
+
closeMemberPath: string;
|
|
266
|
+
volumeMemberPath: string;
|
|
267
|
+
dateMemberPath: string;
|
|
268
|
+
volumeType: VolumeType; // None, Column, Line, Area
|
|
269
|
+
indicatorTypes: IndicatorType[]; // RSI, MACD, etc.
|
|
270
|
+
zoomSliderType: FinancialChartType; // Should match chartType
|
|
271
|
+
xAxisTitle: string;
|
|
272
|
+
yAxisTitle: string;
|
|
273
|
+
xAxisMode: AxisMode; // OrdinalTimeX, DateTimeX
|
|
274
|
+
yAxisMode: AxisMode;
|
|
275
|
+
showDefaultTooltip: boolean;
|
|
276
|
+
isHorizontalZoomEnabled: boolean;
|
|
277
|
+
isVerticalZoomEnabled: boolean;
|
|
278
|
+
crosshairsDisplayMode: CrosshairsDisplayMode;
|
|
279
|
+
trendLineType: TrendLineType;
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### IgxPieChartComponent / IgxDataPieChartComponent
|
|
283
|
+
```typescript
|
|
284
|
+
itemsSource: any[];
|
|
285
|
+
labelMemberPath: string;
|
|
286
|
+
valueMemberPath: string;
|
|
287
|
+
legend: IgxLegendComponent;
|
|
288
|
+
legendLabelMemberPath: string;
|
|
289
|
+
legendItemTemplate: TemplateRef;
|
|
290
|
+
legendItemBadgeTemplate: TemplateRef;
|
|
291
|
+
selectionMode: SelectionMode; // Single, Multiple, Manual
|
|
292
|
+
selectionBehavior: SelectionBehavior;
|
|
293
|
+
allowSliceExplosion: boolean;
|
|
294
|
+
allowSliceSelection: boolean;
|
|
295
|
+
othersCategoryThreshold: number;
|
|
296
|
+
othersCategoryType: OthersCategoryType; // Number, Percent
|
|
297
|
+
startAngle: number;
|
|
298
|
+
radiusFactor: number;
|
|
299
|
+
showDefaultTooltip: boolean;
|
|
300
|
+
toolTipType: ToolTipType;
|
|
301
|
+
highlightingMode: HighlightingMode;
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## Import Paths
|
|
307
|
+
|
|
308
|
+
> **Chart components are NOT standalone** — always import via their NgModule, never by component class. Standalone Angular components can import NgModules directly in their `imports` array.
|
|
309
|
+
|
|
310
|
+
### NgModule imports (required for all project types)
|
|
311
|
+
|
|
312
|
+
```typescript
|
|
313
|
+
// NgModules — import these into your standalone component's 'imports' array
|
|
314
|
+
// or into an NgModule's 'imports' array
|
|
315
|
+
import {
|
|
316
|
+
IgxCategoryChartModule, // provides IgxCategoryChartComponent
|
|
317
|
+
IgxFinancialChartModule, // provides IgxFinancialChartComponent
|
|
318
|
+
IgxPieChartModule, // provides IgxPieChartComponent
|
|
319
|
+
IgxDataPieChartModule, // provides IgxDataPieChartComponent
|
|
320
|
+
IgxLegendModule, // provides IgxLegendComponent
|
|
321
|
+
} from 'igniteui-angular-charts';
|
|
322
|
+
|
|
323
|
+
// Enums and types — these ARE plain TS exports and can be imported directly
|
|
324
|
+
import {
|
|
325
|
+
FinancialChartType,
|
|
326
|
+
MarkerType,
|
|
327
|
+
ToolTipType,
|
|
328
|
+
TrendLineTypeCollection,
|
|
329
|
+
HighlightingMode,
|
|
330
|
+
TransitionInSpeedType,
|
|
331
|
+
AxisLabelSettings,
|
|
332
|
+
CrosshairsDisplayMode,
|
|
333
|
+
LegendOrientation,
|
|
334
|
+
OthersCategoryContext,
|
|
335
|
+
SeriesSelectionMode,
|
|
336
|
+
IndicatorDisplayType,
|
|
337
|
+
FinancialChartVolumeType,
|
|
338
|
+
AxisOrientation
|
|
339
|
+
} from 'igniteui-angular-charts';
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Standalone component example
|
|
343
|
+
|
|
344
|
+
```typescript
|
|
345
|
+
import { Component } from '@angular/core';
|
|
346
|
+
import {
|
|
347
|
+
IgxCategoryChartModule,
|
|
348
|
+
ChartType
|
|
349
|
+
} from 'igniteui-angular-charts';
|
|
350
|
+
|
|
351
|
+
@Component({
|
|
352
|
+
selector: 'app-sales-chart',
|
|
353
|
+
imports: [
|
|
354
|
+
IgxCategoryChartModule // ✅ Import the NgModule, NOT IgxCategoryChartComponent
|
|
355
|
+
],
|
|
356
|
+
template: `
|
|
357
|
+
<igx-category-chart
|
|
358
|
+
[dataSource]="data"
|
|
359
|
+
chartType="Column"
|
|
360
|
+
xAxisTitle="Month"
|
|
361
|
+
yAxisTitle="Revenue ($)"
|
|
362
|
+
[transitionInMode]="'FromZero'"
|
|
363
|
+
[transitionInDuration]="400">
|
|
364
|
+
</igx-category-chart>
|
|
365
|
+
`
|
|
366
|
+
})
|
|
367
|
+
export class SalesChartComponent {
|
|
368
|
+
data = [
|
|
369
|
+
{ month: 'Jan', revenue: 5000 },
|
|
370
|
+
{ month: 'Feb', revenue: 6500 },
|
|
371
|
+
{ month: 'Mar', revenue: 7200 }
|
|
372
|
+
];
|
|
373
|
+
}
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### Common errors and fixes
|
|
377
|
+
|
|
378
|
+
**Error 1: NG2011 — component not standalone**
|
|
379
|
+
```
|
|
380
|
+
// ❌ WRONG: importing component directly
|
|
381
|
+
import { IgxCategoryChartComponent } from 'igniteui-angular-charts';
|
|
382
|
+
@Component({ imports: [IgxCategoryChartComponent] })
|
|
383
|
+
|
|
384
|
+
// ✅ CORRECT: import the NgModule instead
|
|
385
|
+
import { IgxCategoryChartModule } from 'igniteui-angular-charts';
|
|
386
|
+
@Component({ imports: [IgxCategoryChartModule] })
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
**Error 2: NG8002 — can't bind to property (incorrect inputs)**
|
|
390
|
+
```
|
|
391
|
+
// ❌ WRONG: using IgxDataChartComponent or generic property names
|
|
392
|
+
<igx-category-chart
|
|
393
|
+
[itemsSource]="data" <!-- Use 'dataSource' instead -->
|
|
394
|
+
[valueMemberPath]="'value'" <!-- Auto-detected for Category Chart -->
|
|
395
|
+
[showDefaultTooltip]="true" <!-- Not a valid input -->
|
|
396
|
+
[transitionDuration]="400"> <!-- Use 'transitionInDuration' -->
|
|
397
|
+
|
|
398
|
+
// ✅ CORRECT: use Category Chart's actual inputs
|
|
399
|
+
<igx-category-chart
|
|
400
|
+
[dataSource]="data"
|
|
401
|
+
chartType="Column"
|
|
402
|
+
[transitionInMode]="'FromZero'"
|
|
403
|
+
[transitionInDuration]="400">
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
**Key difference**: IgxCategoryChartComponent **auto-detects** numeric columns and requires minimal configuration. For fine-grained control over field mapping and series types, use `IgxDataChartComponent` instead (but it requires explicit series and axis components).
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
## Styling & Theming
|
|
411
|
+
|
|
412
|
+
### Color Customization
|
|
413
|
+
- **Series colors**: `brushes` (fill), `outlines` (border)
|
|
414
|
+
- **Marker colors**: `markerBrushes`, `markerOutlines`
|
|
415
|
+
- **Axis styles**: `xAxisMajorStroke`, `yAxisMajorStroke`, `xAxisLabelBrush`, `yAxisLabelBrush`
|
|
416
|
+
- **Tooltip**: `toolTipBrush`, `toolTipTextColor`
|
|
417
|
+
- **Highlight**: `highlightedSeriesOpacity`, `highlightedItemsOpacity`
|
|
418
|
+
|
|
419
|
+
### CSS & Host Binding
|
|
420
|
+
- Chart containers inherit CSS flex/grid properties
|
|
421
|
+
- Use host element width/height for responsive sizing
|
|
422
|
+
- Theme colors via `IgxTheme` palette
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
## Data Requirements
|
|
427
|
+
|
|
428
|
+
### Category Chart (Area, Bar, Column, Line)
|
|
429
|
+
- Array or list of data items
|
|
430
|
+
- At least 1 numeric column (values)
|
|
431
|
+
- Optionally 1 string/date column (labels)
|
|
432
|
+
- Example: `[{ month: 'Jan', value: 100 }, { month: 'Feb', value: 150 }]`
|
|
433
|
+
|
|
434
|
+
### Financial Chart (Stock)
|
|
435
|
+
- Array of data items with date/time column
|
|
436
|
+
- For Candlestick: 4 numeric columns (O, H, L, C)
|
|
437
|
+
- For Volume: 5 numeric columns (O, H, L, C, Volume)
|
|
438
|
+
- Example: `[{ date: '2024-01-01', open: 100, high: 120, low: 95, close: 115, volume: 1000 }]`
|
|
439
|
+
|
|
440
|
+
### Pie Chart
|
|
441
|
+
- Array of data items
|
|
442
|
+
- 1 label column (category)
|
|
443
|
+
- 1 numeric column (value; segments should sum to 100%)
|
|
444
|
+
- Example: `[{ label: 'Category A', value: 30 }, { label: 'Category B', value: 70 }]`
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
## Documentation References
|
|
449
|
+
|
|
450
|
+
- **Chart Overview**: https://www.infragistics.com/products/ignite-ui-angular/angular/components/charts/chart-overview
|
|
451
|
+
- **Chart API**: https://www.infragistics.com/products/ignite-ui-angular/angular/components/charts/chart-api
|
|
452
|
+
- **Chart Features**: https://www.infragistics.com/products/ignite-ui-angular/angular/components/charts/chart-features
|
|
453
|
+
- **Area Chart**: https://www.infragistics.com/products/ignite-ui-angular/angular/components/charts/types/area-chart
|
|
454
|
+
- **Bar Chart**: https://www.infragistics.com/products/ignite-ui-angular/angular/components/charts/types/bar-chart
|
|
455
|
+
- **Column Chart**: https://www.infragistics.com/products/ignite-ui-angular/angular/components/charts/types/column-chart
|
|
456
|
+
- **Stock Chart**: https://www.infragistics.com/products/ignite-ui-angular/angular/components/charts/types/stock-chart
|
|
457
|
+
- **Pie Chart**: https://www.infragistics.com/products/ignite-ui-angular/angular/components/charts/types/pie-chart
|