igniteui-cli 15.5.1 → 15.6.1
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/package.json +4 -4
- package/templates/blazor/igb/projects/ai-config/files/skills/AGENTS.md +6 -3
- package/templates/blazor/igb/projects/ai-config/files/skills/README.md +30 -45
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/SKILL.md +48 -96
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/charts.md +61 -238
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/data-display.md +60 -193
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/feedback.md +36 -92
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +66 -224
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout-manager.md +39 -88
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout.md +75 -152
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/setup.md +40 -149
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/SKILL.md +58 -243
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/component-mapping.md +89 -280
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/gotchas.md +143 -431
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/SKILL.md +91 -157
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/data-operations.md +50 -228
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/editing.md +61 -222
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/features.md +67 -360
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/grid-migration.md +55 -236
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/paging-remote.md +53 -202
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/sizing.md +31 -232
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/state.md +27 -119
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/structure.md +88 -363
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/types.md +87 -415
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/SKILL.md +8 -4
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/references/interop-contracts.md +42 -6
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md +83 -211
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/common-patterns.md +93 -184
- package/templates/react/igr-ts/avatar/default/files/src/app/__path__/__filePrefix__.tsx +3 -3
- package/templates/react/igr-ts/avatar/default/files/src/app/__path__/style.module.css +9 -0
- package/templates/react/igr-ts/button/default/files/src/app/__path__/__filePrefix__.tsx +1 -1
- package/templates/react/igr-ts/button/default/files/src/app/__path__/style.module.css +3 -0
- package/templates/react/igr-ts/icon/default/files/src/app/__path__/__filePrefix__.tsx +2 -2
- package/templates/react/igr-ts/icon/default/files/src/app/__path__/style.module.css +3 -0
- package/templates/react/igr-ts/icon-button/default/files/src/app/__path__/__filePrefix__.tsx +1 -1
- package/templates/react/igr-ts/icon-button/default/files/src/app/__path__/style.module.css +3 -0
- package/templates/react/igr-ts/pivot-grid/basic/files/src/app/__path__/__filePrefix__.tsx +3 -4
- package/templates/react/igr-ts/projects/_base/files/package.json +1 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/README.md +30 -83
- package/templates/react/igr-ts/projects/ai-config/files/skills/grid-lite-to-igr-grid-migration/SKILL.md +98 -191
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/SKILL.md +38 -147
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENTS.md +65 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/DATAVIZ.md +90 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP.md +43 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/TROUBLESHOOTING.md +17 -145
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/USAGE.md +85 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/SKILL.md +83 -135
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/CSS-THEMING.md +51 -218
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/SKILL.md +58 -187
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/gotchas.md +55 -154
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-optimize-bundle-size/SKILL.md +48 -401
- package/templates/webcomponents/igc-ts/avatar/default/files/src/app/__path__/__filePrefix__.ts +7 -2
- package/templates/webcomponents/igc-ts/button/default/files/src/app/__path__/__filePrefix__.ts +8 -3
- package/templates/webcomponents/igc-ts/card/default/files/src/app/__path__/__filePrefix__.ts +3 -1
- package/templates/webcomponents/igc-ts/constants.d.ts +5 -5
- package/templates/webcomponents/igc-ts/constants.js +5 -5
- package/templates/webcomponents/igc-ts/date-time-input/default/files/src/app/__path__/__filePrefix__.ts +8 -2
- package/templates/webcomponents/igc-ts/icon/default/files/src/app/__path__/__filePrefix__.ts +7 -3
- package/templates/webcomponents/igc-ts/icon-button/default/files/src/app/__path__/__filePrefix__.ts +8 -2
- package/templates/webcomponents/igc-ts/projects/_base/files/package.json +1 -1
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +6 -6
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/README.md +1 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/login-bar/login-bar.ts +1 -1
- package/templates/webcomponents/igc-ts/tabs/default/files/src/app/__path__/__filePrefix__.ts +21 -15
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/mcp-setup.md +0 -78
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/mcp-setup.md +0 -78
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/mcp-setup.md +0 -81
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/CHARTS-GRIDS.md +0 -398
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENT-CATALOGUE.md +0 -161
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/EVENT-HANDLING.md +0 -72
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/INSTALLATION.md +0 -139
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/JSX-PATTERNS.md +0 -187
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP-SERVER.md +0 -77
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/REFS-FORMS.md +0 -232
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/MCP-SERVER.md +0 -67
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/TROUBLESHOOTING.md +0 -35
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/component-mapping.md +0 -132
- /package/templates/webcomponents/igc-ts/tabs/default/files/src/app/__path__/{__filePrefix__.test → __filePrefix__.test.ts} +0 -0
|
@@ -1,304 +1,127 @@
|
|
|
1
1
|
# Charts & Data Visualization
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
##
|
|
5
|
+
## Choosing a component
|
|
7
6
|
|
|
8
|
-
|
|
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
|
-
|
|
|
34
|
-
|
|
|
35
|
-
| Candlestick / OHLC
|
|
36
|
-
| Part-to-whole
|
|
37
|
-
|
|
|
38
|
-
| Inline
|
|
39
|
-
| Hierarchical part-to-whole
|
|
40
|
-
| Geographic points, shapes,
|
|
41
|
-
| KPI
|
|
42
|
-
| Auto-generated dashboard
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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"
|
|
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
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
-
|
|
111
|
-
|
|
112
|
-
private IgbLegend _legend;
|
|
55
|
+
private IgbLegend _legend = default!;
|
|
113
56
|
private IgbLegend Legend
|
|
114
57
|
{
|
|
115
|
-
get
|
|
116
|
-
set { _legend = value; StateHasChanged(); }
|
|
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`
|
|
122
|
-
|
|
123
|
-
|
|
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
|
|
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
|
|
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
|
-
<
|
|
157
|
-
|
|
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
|
-
|
|
189
|
-
<
|
|
190
|
-
|
|
191
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
288
|
-
|
|
289
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|