igniteui-cli 15.5.0 → 15.6.0

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.
Files changed (76) hide show
  1. package/package.json +4 -4
  2. package/templates/blazor/igb/projects/ai-config/files/skills/AGENTS.md +6 -3
  3. package/templates/blazor/igb/projects/ai-config/files/skills/README.md +30 -45
  4. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/SKILL.md +48 -96
  5. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/charts.md +61 -238
  6. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/data-display.md +60 -193
  7. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/feedback.md +36 -92
  8. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +66 -224
  9. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout-manager.md +39 -88
  10. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout.md +75 -152
  11. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/setup.md +40 -149
  12. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/SKILL.md +58 -243
  13. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/component-mapping.md +89 -280
  14. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/gotchas.md +143 -431
  15. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/SKILL.md +91 -157
  16. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/data-operations.md +50 -228
  17. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/editing.md +61 -222
  18. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/features.md +67 -360
  19. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/grid-migration.md +55 -236
  20. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/paging-remote.md +53 -202
  21. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/sizing.md +31 -232
  22. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/state.md +27 -119
  23. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/structure.md +88 -363
  24. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/types.md +87 -415
  25. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/SKILL.md +86 -0
  26. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/references/interop-contracts.md +220 -0
  27. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md +83 -211
  28. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/common-patterns.md +93 -184
  29. package/templates/react/igr-ts/projects/_base/files/src/main.tsx +1 -0
  30. package/templates/react/igr-ts/projects/_base_with_home/files/src/app/home/style.module.css +3 -3
  31. package/templates/react/igr-ts/projects/ai-config/files/skills/README.md +30 -83
  32. package/templates/react/igr-ts/projects/ai-config/files/skills/grid-lite-to-igr-grid-migration/SKILL.md +98 -191
  33. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/SKILL.md +38 -147
  34. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENTS.md +65 -0
  35. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/DATAVIZ.md +90 -0
  36. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP.md +43 -0
  37. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/TROUBLESHOOTING.md +17 -145
  38. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/USAGE.md +85 -0
  39. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/SKILL.md +83 -135
  40. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/CSS-THEMING.md +51 -218
  41. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/SKILL.md +58 -187
  42. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/gotchas.md +55 -154
  43. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-optimize-bundle-size/SKILL.md +48 -401
  44. package/templates/react/igr-ts/projects/side-nav/files/src/app/app.css +9 -9
  45. package/templates/react/igr-ts/projects/side-nav/files/src/app/home/style.module.css +7 -7
  46. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/app.css +8 -8
  47. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.module.css +1 -69
  48. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.tsx +5 -5
  49. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginBar.module.css +5 -26
  50. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginDialog.module.css +0 -1
  51. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.module.css +1 -56
  52. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.tsx +2 -2
  53. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/Profile.module.css +11 -11
  54. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectFacebook.tsx +1 -1
  55. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectGoogle.tsx +1 -1
  56. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectMicrosoft.tsx +1 -1
  57. package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app.css +9 -9
  58. package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/home/style.module.css +7 -7
  59. package/templates/react/igr-ts/projects/side-nav-mini-auth/files/src/app/app.css +7 -7
  60. package/templates/webcomponents/igc-ts/constants.d.ts +5 -5
  61. package/templates/webcomponents/igc-ts/constants.js +5 -5
  62. package/templates/webcomponents/igc-ts/projects/_base/files/package.json +1 -1
  63. package/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +6 -6
  64. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/mcp-setup.md +0 -78
  65. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/mcp-setup.md +0 -78
  66. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/mcp-setup.md +0 -81
  67. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/CHARTS-GRIDS.md +0 -398
  68. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENT-CATALOGUE.md +0 -161
  69. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/EVENT-HANDLING.md +0 -72
  70. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/INSTALLATION.md +0 -139
  71. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/JSX-PATTERNS.md +0 -187
  72. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP-SERVER.md +0 -77
  73. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/REFS-FORMS.md +0 -232
  74. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/MCP-SERVER.md +0 -67
  75. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/TROUBLESHOOTING.md +0 -35
  76. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/component-mapping.md +0 -132
@@ -1,304 +1,127 @@
1
1
  # Charts & Data Visualization
2
2
 
3
- > **Part of the [`igniteui-blazor-components`](../SKILL.md) skill hub.**
4
- > For project setup and module registration, see [`setup.md`](./setup.md).
3
+ All visualization components require `IgniteUI.Blazor` or `IgniteUI.Blazor.Trial` — they are **not** in `IgniteUI.Blazor.Lite`. Ignite UI ships 65+ chart types; this file covers the common ones and the traps. Call `get_doc` / `get_api_reference` for anything beyond it.
5
4
 
6
- ## Contents
5
+ ## Choosing a component
7
6
 
8
- - [Overview](#overview)
9
- - [Chart Type Decision Guide](#chart-type-decision-guide)
10
- - [Category Chart](#category-chart)
11
- - [Data Chart](#data-chart)
12
- - [Financial / Stock Chart](#financial--stock-chart)
13
- - [Pie Chart](#pie-chart)
14
- - [Donut Chart](#donut-chart)
15
- - [Sparkline](#sparkline)
16
- - [Treemap](#treemap)
17
- - [Geographic Map](#geographic-map)
18
- - [Gauges](#gauges)
19
- - [Dashboard Tile](#dashboard-tile)
20
- - [Common Chart Features](#common-chart-features)
21
- - [Key Rules](#key-rules)
22
-
23
- ---
24
- ## Overview
25
-
26
- Ignite UI for Blazor provides 65+ chart types for data visualization. Charts are part of the IgniteUI.Blazor package (trial watermarked version available in the IgniteUI.Blazor.Trial public NuGet package).
27
- This reference gives high-level guidance on when to use some of the chart types, their key features, and common API members. For detailed documentation, call `get_doc` and `get_api_reference` from `igniteui-cli` with the specific chart component or feature you're interested in.
28
-
29
- ## Chart Type Decision Guide
30
-
31
- | Use case | Recommended component |
7
+ | Need | Component |
32
8
  |---|---|
33
- | Simple line/area/column/point/spline/waterfall charts with minimal config | `IgbCategoryChart` |
34
- | Multiple series types on the same chart, custom axes, annotations | `IgbDataChart` |
35
- | Candlestick / OHLC financial data with range selector | `IgbFinancialChart` |
36
- | Part-to-whole proportions (slices) | `IgbPieChart` |
37
- | Donut with center label | `IgbDoughnutChart` |
38
- | Inline sparkline for tables or cards | `IgbSparkline` |
39
- | Hierarchical part-to-whole data | `IgbTreemap` |
40
- | Geographic points, shapes, map markers | `IgbGeographicMap` |
41
- | KPI values, ranges, scales, bullet comparisons | `IgbLinearGauge` / `IgbRadialGauge` / `IgbBulletGraph` |
42
- | Auto-generated dashboard visualization from data | `IgbDashboardTile` |
43
-
44
- ---
9
+ | Line / area / column / point / spline / waterfall with minimal config | `IgbCategoryChart` |
10
+ | Several series types on one chart, custom axes, annotations, true horizontal bars | `IgbDataChart` |
11
+ | Candlestick / OHLC with range selector | `IgbFinancialChart` |
12
+ | Part-to-whole slices | `IgbPieChart` |
13
+ | Ring with a hollow center | `IgbDoughnutChart` + `IgbRingSeries` |
14
+ | Inline micro-chart in a table or card | `IgbSparkline` |
15
+ | Hierarchical part-to-whole | `IgbTreemap` |
16
+ | Geographic points, shapes, routes | `IgbGeographicMap` |
17
+ | KPI value on a scale, needle, bullet comparison | `IgbLinearGauge` / `IgbRadialGauge` / `IgbBulletGraph` |
18
+ | Auto-generated dashboard visual from data | `IgbDashboardTile` |
45
19
 
46
20
  ## Category Chart
47
21
 
48
- ```csharp
49
- builder.Services.AddIgniteUIBlazor(typeof(IgbCategoryChartModule));
50
- ```
51
-
52
22
  ```razor
53
23
  <IgbCategoryChart DataSource="SalesData"
54
24
  ChartType="CategoryChartType.Line"
55
- Height="400px"
56
- Width="100%"
57
- YAxisTitle="Revenue (USD)"
58
- XAxisTitle="Month"
25
+ Width="100%" Height="400px"
26
+ XAxisTitle="Month" YAxisTitle="Revenue (USD)"
59
27
  Brushes="DodgerBlue IndianRed"
28
+ IncludedProperties='@(new string[] { "Month", "Revenue" })'
60
29
  IsHorizontalZoomEnabled="true"
61
- IsVerticalZoomEnabled="false"
62
30
  IsTransitionInEnabled="true" />
63
-
64
- @code {
65
- public List<SalesRecord> SalesData { get; set; } = SampleData.GetSales();
66
- }
67
31
  ```
68
32
 
69
- > **AGENT INSTRUCTION:** `CategoryChartType.Bar` does **not** exist. For a horizontal bar-style chart, use `CategoryChartType.Column` (vertical) or switch to `IgbDataChart` with `IgbBarSeries` for true horizontal bars. Never generate `ChartType="CategoryChartType.Bar"`.
33
+ The chart auto-detects the string/date property for the X axis and creates a series for every numeric property. Narrow that with `IncludedProperties` / `ExcludedProperties`.
70
34
 
71
- > **AGENT INSTRUCTION:** `IgbCategoryChart` auto-detects which string or date property in the data to use as X-axis labels. To control which data properties are charted, use `IncludedProperties` or `ExcludedProperties` (string arrays).
72
-
73
- Brush list properties such as `Brushes`, `Outlines`, `MarkerBrushes`, and `MarkerOutlines` are **string** parameters. Separate multiple colors with spaces, as in `Brushes="DodgerBlue IndianRed"`.
74
-
75
- > **AGENT INSTRUCTION:** `IgbCategoryChart` auto-detects numeric properties in `DataSource` objects and creates series for them. To control which properties are charted, use `IncludedProperties` or `ExcludedProperties` attributes. These are **array** parameters - bind them with `@(new string[] { ... })` syntax:
76
- > ```razor
77
- > <IgbCategoryChart DataSource="SalesData"
78
- > ExcludedProperties='@(new string[] { "Id", "InternalCode" })' />
79
- > ```
80
- > Do NOT pass a plain string like `ExcludedProperties="Id"` - this causes a type mismatch error.
81
-
82
- ---
35
+ - `CategoryChartType.Bar` **does not exist**. `Column` gives vertical bars; true horizontal bars need `IgbDataChart` + `IgbBarSeries`.
36
+ - `IncludedProperties` / `ExcludedProperties` are `string[]` — bind them as `@(new string[] { … })`, never as a plain string.
37
+ - `XAxisLabel` formats labels; it does not select a data field.
38
+ - Match `ChartType` to the curve in the design: `Spline` / `SplineArea` for smooth curves, `Line` / `Area` for angular, `StepLine` / `StepArea` for steps. Defaulting to `Line` when the design shows smooth curves is the most visible fidelity mistake.
39
+ - Markers are shown at every point by default. Suppress them by adding `MarkerType.None` to `MarkerTypes` once the chart ref is ready.
83
40
 
84
41
  ## Data Chart
85
42
 
86
- ```csharp
87
- builder.Services.AddIgniteUIBlazor(typeof(IgbDataChartCoreModule), typeof(IgbDataChartCategoryModule));
88
- // Add additional modules for other series types:
89
- // IgbDataChartScatterModule, IgbDataChartFinancialModule, etc.
90
- ```
91
-
92
43
  ```razor
93
44
  <IgbLegend @ref="Legend" Orientation="LegendOrientation.Horizontal" />
94
- <IgbDataChart Legend="Legend" Height="500px" Width="100%" IsHorizontalZoomEnabled="true">
45
+ <IgbDataChart Legend="Legend" Width="100%" Height="500px" IsHorizontalZoomEnabled="true">
95
46
  <IgbCategoryXAxis Name="xAxis" DataSource="ChartData" Label="Month" />
96
47
  <IgbNumericYAxis Name="yAxis" />
97
- <IgbLineSeries DataSource="ChartData"
98
- XAxisName="xAxis"
99
- YAxisName="yAxis"
100
- ValueMemberPath="Revenue"
101
- Title="Revenue" />
102
- <IgbColumnSeries DataSource="ChartData"
103
- XAxisName="xAxis"
104
- YAxisName="yAxis"
105
- ValueMemberPath="Expenses"
106
- Title="Expenses" />
48
+ <IgbLineSeries DataSource="ChartData" XAxisName="xAxis" YAxisName="yAxis"
49
+ ValueMemberPath="Revenue" Title="Revenue" />
50
+ <IgbColumnSeries DataSource="ChartData" XAxisName="xAxis" YAxisName="yAxis"
51
+ ValueMemberPath="Expenses" Title="Expenses" />
107
52
  </IgbDataChart>
108
53
 
109
54
  @code {
110
- public List<MonthData> ChartData { get; set; } = SampleData.GetMonthly();
111
-
112
- private IgbLegend _legend;
55
+ private IgbLegend _legend = default!;
113
56
  private IgbLegend Legend
114
57
  {
115
- get { return _legend; }
116
- set { _legend = value; StateHasChanged(); } // triggers re-render so Legend="Legend" receives the ref
58
+ get => _legend;
59
+ set { _legend = value; StateHasChanged(); } // re-render so Legend="Legend" receives the ref
117
60
  }
118
61
  }
119
62
  ```
120
63
 
121
- Every series must reference its axes by matching `Name` and `XAxisName` / `YAxisName`.
122
-
123
- > **AGENT INSTRUCTION:** `IgbDataChart` requires separate NuGet module registrations for each category of series. Always check `get_doc` to find the exact module names, for example category, scatter, polar, radial, stacked, or financial modules.
64
+ - Every series must reference its axes by matching `Name` ↔ `XAxisName` / `YAxisName`.
65
+ - `IgbDataChart` needs one module per **series category** — `IgbDataChartCoreModule` plus e.g. `IgbDataChartCategoryModule`, `IgbDataChartScatterModule`, `IgbDataChartFinancialModule`. Check `get_doc` for the exact names.
66
+ - `IgbScatterSeries` / `IgbBubbleSeries` map fields with `XMemberPath` / `YMemberPath` (not `XAxisMemberPath`); bubbles also need `RadiusMemberPath`.
124
67
 
125
- ---
68
+ The legend property-with-`StateHasChanged` idiom above is required for any chart that binds a legend by reference.
126
69
 
127
- ## Financial / Stock Chart
128
-
129
- ```csharp
130
- builder.Services.AddIgniteUIBlazor(typeof(IgbFinancialChartModule));
131
- ```
70
+ ## Financial Chart
132
71
 
133
72
  ```razor
134
- <IgbFinancialChart DataSource="StockData"
135
- Width="100%"
136
- Height="500px"
73
+ <IgbFinancialChart DataSource="StockData" Width="100%" Height="500px"
137
74
  ChartType="FinancialChartType.Candle"
138
75
  ZoomSliderType="FinancialChartZoomSliderType.Line" />
139
-
140
- @code {
141
- public List<StockPrice> StockData { get; set; } = SampleData.GetStockPrices();
142
- }
143
76
  ```
144
77
 
145
- The data source must contain `Open`, `High`, `Low`, `Close`, and `Volume` numeric fields plus a `Date`/`Time` field.
78
+ The data source must expose `Open`, `High`, `Low`, `Close` (and usually `Volume`) numeric fields plus a date/time field, or nothing renders.
146
79
 
147
- ---
148
-
149
- ## Pie Chart
150
-
151
- ```csharp
152
- builder.Services.AddIgniteUIBlazor(typeof(IgbPieChartModule), typeof(IgbItemLegendModule));
153
- ```
80
+ ## Pie & Donut
154
81
 
155
82
  ```razor
156
- <IgbItemLegend @ref="PieLegend" Orientation="LegendOrientation.Horizontal" />
157
- <IgbPieChart DataSource="SliceData"
158
- LabelMemberPath="Department"
159
- ValueMemberPath="Budget"
160
- Width="500px"
161
- Height="400px"
162
- LegendLabelMemberPath="Department"
163
- Legend="PieLegend"
164
- SliceClick="OnSliceClick" />
165
-
166
- @code {
167
- public List<BudgetSlice> SliceData { get; set; } = SampleData.GetBudget();
168
-
169
- private IgbItemLegend _pieLegend;
170
- private IgbItemLegend PieLegend
171
- {
172
- get { return _pieLegend; }
173
- set { _pieLegend = value; StateHasChanged(); }
174
- }
175
-
176
- void OnSliceClick(IgbSliceClickEventArgs e) { /* handle click */ }
177
- }
178
- ```
179
-
180
- ---
181
-
182
- ## Donut Chart
183
-
184
- ```csharp
185
- builder.Services.AddIgniteUIBlazor(typeof(IgbDoughnutChartModule), typeof(IgbRingSeriesModule));
186
- ```
83
+ <IgbPieChart DataSource="SliceData" LabelMemberPath="Department" ValueMemberPath="Budget"
84
+ Width="500px" Height="400px" Legend="PieLegend" SliceClick="OnSliceClick" />
187
85
 
188
- ```razor
189
- <IgbDoughnutChart Width="400px" Height="400px">
190
- <IgbRingSeries DataSource="DonutData"
191
- LabelMemberPath="Category"
192
- ValueMemberPath="Share" />
86
+ <IgbDoughnutChart InnerExtent="0.6" Width="220px" Height="220px">
87
+ <IgbRingSeries DataSource="DonutData" LabelMemberPath="Category" ValueMemberPath="Share"
88
+ Brushes="#5B57E8 #E8E8F5" Outlines="transparent transparent"
89
+ LabelsPosition="LabelsPosition.None" />
193
90
  </IgbDoughnutChart>
194
91
  ```
195
92
 
196
- Supports multiple `IgbRingSeries` for concentric rings.
197
-
198
- ---
93
+ - **`InnerExtent` is a chart property, never a series property.** `<IgbRingSeries InnerExtent="…">` throws `InvalidOperationException: IgbRingSeries does not have a property matching 'InnerExtent'`.
94
+ - `IgbDoughnutChart` supports multiple `IgbRingSeries` for concentric rings.
95
+ - For a static colored ring with a centered value and no needle, use `IgbDoughnutChart` and absolutely position the label over it — `IgbRadialGauge` and `IgbCircularProgress` will not produce that look.
199
96
 
200
97
  ## Sparkline
201
98
 
202
- ```csharp
203
- builder.Services.AddIgniteUIBlazor(typeof(IgbSparklineModule));
204
- ```
205
-
206
99
  ```razor
207
- <IgbSparkline DataSource="TrendData"
208
- ValueMemberPath="Value"
100
+ <IgbSparkline DataSource="TrendData" ValueMemberPath="Value"
209
101
  DisplayType="SparklineDisplayType.Line"
210
- Width="120px"
211
- Height="40px"
212
- Brush="DodgerBlue"
213
- LineThickness="2" />
102
+ Width="120px" Height="40px" Brush="DodgerBlue" LineThickness="2" />
214
103
  ```
215
104
 
216
- ---
217
-
218
- ## Treemap
219
-
220
- Always call `get_doc("blazor", "treemap-chart")` before writing markup because hierarchy binding, member paths, and layout options are component-specific.
221
-
222
- ---
223
-
224
- ## Geographic Map
225
-
226
- Use Geographic Map for map backgrounds, shape files, geographic points, bubbles, and marker layers. Do not adapt Data Chart axis or series examples to maps unless the Blazor Geographic Map docs explicitly show the same API.
227
-
228
- ---
105
+ `DisplayType` supports only `Line`, `Area`, `Column`, `WinLoss`, and `Area` renders as an angular polygon. For a smooth mountain-shaped micro-chart use a small `IgbCategoryChart` with `ChartType="CategoryChartType.SplineArea"` and `AreaFillOpacity` — `AreaFillOpacity` does not exist on `IgbSparkline`.
229
106
 
230
- ## Gauges
107
+ ## Treemap, Geographic Map, Gauges, Dashboard Tile
231
108
 
232
- Use gauges for KPI values, ranges, thresholds, progress-style numeric summaries, and bullet comparisons. Select the exact gauge doc first, then use the MCP-documented property names for ranges, labels, scale, and value binding.
109
+ Binding shapes differ enough between these that guessing fails: read `get_doc` for `treemap-chart`, the geographic-map series types, the specific gauge, or `dashboard-tile` before writing markup. Map series (`IgbGeographicSymbolSeries`, `IgbGeographicShapeSeries`, `IgbGeographicPolylineSeries`, `IgbGeographicProportionalSymbolSeries`) are declared as child components, not added from code, and do not follow Data Chart axis conventions.
233
110
 
234
- ---
111
+ ## Cross-cutting rules
235
112
 
236
- ## Dashboard Tile
237
-
238
- Use Dashboard Tile when the requested component should infer or render compact dashboard visualizations from bound data. Verify supported chart modes and binding shape with MCP before producing code.
239
-
240
- ---
241
-
242
- ## Common Chart Features
243
-
244
- ### Legends
245
-
246
- ```razor
247
- <IgbLegend @ref="Legend" Orientation="LegendOrientation.Horizontal" />
248
- <IgbCategoryChart DataSource="Data" Legend="Legend" />
249
-
250
- @code {
251
- private IgbLegend _legend;
252
- private IgbLegend Legend
253
- {
254
- get { return _legend; }
255
- set { _legend = value; StateHasChanged(); } // triggers re-render so Legend="Legend" receives the ref
256
- }
257
- }
258
- ```
259
-
260
- ### Tooltips
261
-
262
- ```razor
263
- <!-- Default tooltip is shown automatically on hover — no property needed -->
264
- <IgbCategoryChart DataSource="Data" />
265
-
266
- <!-- Custom tooltip via TooltipTemplate -->
267
- <IgbCategoryChart DataSource="Data" TooltipTemplate="@TooltipFragment" />
268
- ```
269
-
270
- ### Animations
271
-
272
- ```razor
273
- <IgbCategoryChart IsTransitionInEnabled="true" TransitionInDuration="1000" />
274
- ```
275
-
276
- ### Highlighting
277
-
278
- ```razor
279
- <IgbCategoryChart IsSeriesHighlightingEnabled="true"
280
- HighlightingMode="SeriesHighlightingMode.FadeOthers"
281
- HighlightingBehavior="SeriesHighlightingBehavior.NearestItemsAndSeries" />
282
- ```
113
+ **Explicit `Width` and `Height` are mandatory** — charts do not size to their container on their own. Inside a CSS Grid track also set `min-height: 0` on the cell and `Height="100%"` on the chart, or the track collapses to zero.
283
114
 
284
- ### Zooming and Panning
115
+ **Charts ignore the CSS theme.** Charts, maps, gauges, and sparklines do not read `--ig-*` design tokens. Set their colors through component parameters, using resolved color values rather than `var()` references:
285
116
 
286
117
  ```razor
287
- <IgbCategoryChart IsHorizontalZoomEnabled="true"
288
- IsVerticalZoomEnabled="false"
289
- CrosshairsDisplayMode="CrosshairsDisplayMode.Both" />
118
+ <IgbCategoryChart Brushes="#4FC3F7 #81C784" Outlines="#4FC3F7 #81C784"
119
+ MarkerBrushes="#4FC3F7 #81C784"
120
+ XAxisLabelTextColor="#666666" YAxisLabelTextColor="#666666" />
290
121
  ```
291
122
 
292
- ---
123
+ `Brushes`, `Outlines`, `MarkerBrushes`, `MarkerOutlines` are **space-separated strings**, not arrays.
293
124
 
294
- ## Key Rules
125
+ **Set visual parameters inline in markup, not via `@ref` in `OnAfterRenderAsync`** — assigning them to a component reference raises Blazor warning **BL0005** (component parameter set outside its component).
295
126
 
296
- 1. **`IgbCategoryChart` is the fastest path for standard charts.** It auto-generates series from data. Use `IgbDataChart` only when you need multiple series types, custom axes, or advanced features.
297
- 2. **`IgbDataChart` requires one module per series category.** Check `get_doc` for the exact module name.
298
- 3. **Financial chart data must have `Open`, `High`, `Low`, `Close` fields.** If the data model is different, the chart will not render correctly.
299
- 4. **Always set explicit `Width` and `Height` on charts.** Charts do not auto-size to their container without a height.
300
- 5. **`IgbDataChart` series must match axes by name.** The `XAxisName` / `YAxisName` on each series must match the `Name` attribute of the axis component.
301
- 6. **`IncludedProperties` and `ExcludedProperties` are `string[]` arrays.** Bind with `@(new string[] { "Prop1", "Prop2" })`. Do not pass a plain string.
302
- 7. **`CategoryChartType.Bar` does not exist.** Use `Column` for vertical bars in `IgbCategoryChart`. For horizontal bars, use `IgbDataChart` with `IgbBarSeries`.
303
- 8. **Do not use `XAxisLabel` to specify a data field.** It controls label formatting only. Use `IncludedProperties`/`ExcludedProperties` on `IgbCategoryChart`, or `Label` on `IgbCategoryXAxis` for `IgbDataChart`.
304
- 9. **Scatter and bubble series use `XMemberPath`/`YMemberPath`, not `XAxisMemberPath`.** For `IgbScatterSeries` and `IgbBubbleSeries`, map data fields with `XMemberPath="FieldX"` and `YMemberPath="FieldY"`. `IgbBubbleSeries` additionally requires `RadiusMemberPath`.
127
+ **Other common parameters:** default tooltips appear on hover with no configuration (`TooltipTemplate` replaces them); `IsTransitionInEnabled` / `TransitionInDuration` animate entry; `IsSeriesHighlightingEnabled` with `HighlightingMode` / `HighlightingBehavior` controls hover emphasis; `IsHorizontalZoomEnabled` / `IsVerticalZoomEnabled` and `CrosshairsDisplayMode` handle zoom and crosshairs.