Implementing Syncfusion Blazor Accumulation Charts
NuGet: Syncfusion.Blazor.Charts + Syncfusion.Blazor.Themes
Namespace: Syncfusion.Blazor.Charts
A comprehensive guide for implementing the Syncfusion Blazor Accumulation Chart component to create interactive pie, doughnut, funnel, and pyramid charts that visualize proportional and hierarchical data in Blazor applications.
When to Use This Skill
Use this skill when you need to:
- Create pie charts to show proportional data distribution
- Build doughnut charts with center labels or multiple series
- Implement funnel charts for stage-based data (sales pipeline, conversion rates)
- Create pyramid charts for hierarchical data visualization
- Display percentage distributions and part-to-whole relationships
- Visualize market share, survey results, or categorical proportions
- Show composition data with interactive slicing and legends
- Add data labels with smart positioning and connector lines
- Implement center labels for doughnut charts with dynamic content
- Customize appearance with gradients, themes, and annotations
- Group small slices to improve readability
- Handle user interactions with tooltips, selection, and events
- Create accessible charts with ARIA support and keyboard navigation
Component Overview
The Syncfusion Blazor Accumulation Chart component specializes in circular and triangular visualizations for proportional data:
- 4 Chart Types: Pie, Doughnut, Funnel, Pyramid
- Data Labels: Smart positioning, connector lines, templates, text wrapping
- Legends: Customizable positioning, paging, click behavior
- Tooltips: Formatted display, custom templates
- Center Labels: Doughnut-specific feature with dynamic content
- Grouping: Combine small slices into "Others" category
- Customization: Gradients, annotations, themes, colors, borders
- Interactivity: Selection, explosion, hover effects, animations
- Accessibility: WCAG compliance, ARIA support, keyboard navigation
- Export: Print support, image export
Documentation and Navigation Guide
Getting Started
📄 Read: references/getting-started.md
Use this when:
- Setting up a new Blazor Accumulation Chart project
- Installing NuGet packages and dependencies
- Creating your first pie or doughnut chart
- Understanding basic component structure
- Working with Visual Studio, VS Code, or .NET CLI
- Binding data to accumulation charts
Topics covered:
- Installation prerequisites and system requirements
- NuGet package installation (Syncfusion.Blazor.Charts)
- Service registration and namespace imports
- Theme and script references
- Basic SfAccumulationChart implementation
- Data source configuration (XName, YName properties)
- Adding title, data labels, tooltip, and legend
- Running the application
Chart Types
📄 Read: references/chart-types.md
Use this when:
- Choosing the right chart type for your data
- Implementing pie charts (default type)
- Creating doughnut charts with inner radius
- Building funnel charts for conversion visualization
- Designing pyramid charts for hierarchical data
- Understanding type-specific properties
Topics covered:
- Pie Chart: Default circular visualization, when to use
- Doughnut Chart: Inner radius configuration, center content area
- Funnel Chart: Neck dimensions, width/height ratios, data flow
- Pyramid Chart: Linear vs surface mode, base positioning
- Type property configuration
- Visual differences and use cases
- Code examples for each type
Data Labels
📄 Read: references/data-label.md
Use this when:
- Enabling and customizing data labels
- Positioning labels inside or outside slices
- Implementing smart labels for collision avoidance
- Adding connector lines from labels to slices
- Customizing label text, format, and templates
- Handling text wrapping and overflow
- Using custom data fields for label text
Topics covered:
- Visible property to enable labels
- Position options (Inside, Outside)
- Text wrapping with MaxWidth
- Smart label positioning
- Connector line customization (type, length, color, width)
- Text mapping from data source fields
- Format patterns (N1, P1, C1 for numbers/percentages/currency)
- Template customization with HTML and context values
- Font styling, borders, and backgrounds
Legends
📄 Read: references/legend.md
Use this when:
- Adding legends to accumulation charts
- Positioning legends (top, bottom, left, right)
- Customizing legend appearance and behavior
- Implementing legend paging for many data points
- Creating custom legend templates
- Handling legend click events
Topics covered:
- Enabling legends with Visible property
- Position and alignment options
- Legend shape customization
- Text styling and truncation
- Toggle visibility behavior on legend click
- Legend paging configuration
- Custom templates for legend items
- Click and hover events
Tooltips
📄 Read: references/tooltip.md
Use this when:
- Enabling tooltips on hover
- Formatting tooltip content
- Creating custom tooltip templates
- Styling tooltip appearance
- Configuring tooltip behavior and animation
Topics covered:
- Enable property for tooltip activation
- Format string for value display
- Header customization
- Custom templates with HTML
- Border, fill, and font styling
- Animation settings
- Shared tooltips (if applicable)
Center Labels
📄 Read: references/center-label.md
Use this when:
- Adding text in the center of doughnut charts
- Displaying static or dynamic center content
- Customizing center label appearance
- Showing aggregated data in center
- Implementing hover-based center text updates
Topics covered:
- Center label Text property
- TextStyle customization (font, size, color)
- Dynamic text with templates
- Hover-based text updates using events
- Center label visibility control
- Use cases and best practices
Customization and Styling
📄 Read: references/customization-styling.md
Use this when:
- Applying gradient fills to slices
- Grouping small slices into "Others"
- Adding annotations (text, shapes, images)
- Handling empty points in data
- Customizing themes and color palettes
- Setting border styles and radius
- Implementing responsive layouts
- Using adaptive design for mobile
Topics covered:
- Gradients: Radial and linear fills for slices
- Grouping: GroupTo and GroupMode for combining small values
- Annotations: Text, shape, and image annotations with positioning
- Empty Points: Mode options (Zero, Drop, Average, Gap)
- Themes: Built-in themes and custom theme application
- Colors: Custom color palettes and per-point colors
- Borders: Width, color, and dash array
- Radius: Inner radius (doughnut) and overall chart radius
- Responsive: Adaptive layout for different screen sizes
Animation and Events
📄 Read: references/animation-events.md
Use this when:
- Configuring chart load animations
- Handling point selection and click events
- Responding to mouse hover and leave events
- Implementing custom interactions
- Accessing chart lifecycle events
- Working with series and point rendering events
Topics covered:
- Animation: Enable, duration, delay configuration
- Chart Events: Load, Loaded, BeforeResize, Resized
- Point Events: OnPointClick, OnPointMove, PointRender
- Series Events: SeriesRender, OnLegendClick
- Data Label Events: OnDataLabelRender, TextRender
- Selection: OnSelectionComplete, selection mode
- Tooltip Events: TooltipRender
- Event data structures and parameters
- Practical event handling examples
Accessibility and Printing
📄 Read: references/accessibility-printing.md
Use this when:
- Implementing WCAG-compliant charts
- Adding ARIA attributes for screen readers
- Enabling keyboard navigation
- Supporting right-to-left (RTL) layouts
- Implementing print functionality
- Exporting charts as images
- Localizing chart text
Topics covered:
- Accessibility: WCAG 2.1 compliance features
- ARIA: Role, label, and description attributes
- Keyboard: Tab navigation and selection
- Screen Readers: Alternative text and descriptions
- Printing: Print method and configuration
- Export: Image export (PNG, JPG, SVG)
- RTL: Right-to-left language support
- Localization: Culture-specific formatting
API Reference
📄 Read: references/api-reference.md
Use this when:
- Looking up enum values and their exact names
- Understanding public method signatures and parameters
- Finding correct property types and default values
- Troubleshooting API usage issues
- Referencing quick code patterns
- Checking critical usage notes and gotchas
Topics covered:
- Common Enums: AccumulationType, AccumulationLabelPosition, GroupMode, LegendPosition, ExportType
- Key Properties: Type, InnerRadius, Radius, GroupTo, GroupMode, Visible, Enable
- Public Methods: ExportAsync, PrintAsync, Refresh, SetAnnotationValueAsync
- Critical Usage Notes: Center label restrictions, GroupTo semantics, enum qualification
- Common Patterns: Basic pie, doughnut with center label, grouping examples
- Troubleshooting: Label overlap, center label issues, enum compilation errors
Quick Start Example
Here's a minimal pie chart implementation:
@page "/pie-chart"
@using Syncfusion.Blazor.Charts
<SfAccumulationChart Title="Sales Distribution">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@SalesData"
XName="Product"
YName="Sales">
<AccumulationDataLabelSettings Visible="true"
Name="Product">
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<AccumulationChartLegendSettings Visible="true">
</AccumulationChartLegendSettings>
</SfAccumulationChart>
@code {
public class SalesInfo
{
public string Product { get; set; }
public double Sales { get; set; }
}
public List<SalesInfo> SalesData = new List<SalesInfo>
{
new SalesInfo { Product = "Product A", Sales = 35 },
new SalesInfo { Product = "Product B", Sales = 28 },
new SalesInfo { Product = "Product C", Sales = 22 },
new SalesInfo { Product = "Product D", Sales = 15 }
};
}
Common Patterns
Doughnut Chart with Center Label
<SfAccumulationChart Title="Revenue by Region">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@RevenueData"
XName="Region"
YName="Revenue"
InnerRadius="40%">
<AccumulationDataLabelSettings Visible="true" Position="Syncfusion.Blazor.Charts.AccumulationLabelPosition.Outside">
<AccumulationChartConnector Length="20px">
</AccumulationChartConnector>
</AccumulationDataLabelSettings>
<AccumulationChartCenterLabel
Text="Total<br/>$1.2M">
<AccumulationChartCenterLabelFont
Size="16px"
FontWeight="600">
</AccumulationChartCenterLabelFont>
</AccumulationChartCenterLabel>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
Funnel Chart for Conversion
<SfAccumulationChart Title="Sales Funnel">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@ConversionData"
XName="Stage"
YName="Count"
Type="Syncfusion.Blazor.Charts.AccumulationType.Funnel"
NeckWidth="25%"
NeckHeight="10%">
<AccumulationDataLabelSettings Visible="true" Name="Stage">
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
Grouped Pie Chart with Gradients
<SfAccumulationChart Title="Market Share Analysis">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@MarketData"
XName="Company"
YName="Share"
GroupTo="5"
GroupMode="Syncfusion.Blazor.Charts.GroupMode.Value">
<AccumulationDataLabelSettings Visible="true" Position="Syncfusion.Blazor.Charts.AccumulationLabelPosition.Outside">
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<AccumulationChartLegendSettings Visible="true" Position="Syncfusion.Blazor.Charts.LegendPosition.Right">
</AccumulationChartLegendSettings>
</SfAccumulationChart>
@code {
// Data source with gradient applied
public List<MarketInfo> MarketData = new List<MarketInfo>
{
new MarketInfo { Company = "Company A", Share = 35 },
new MarketInfo { Company = "Company B", Share = 20 },
new MarketInfo { Company = "Company C", Share = 15 },
new MarketInfo { Company = "Others", Share = 30 }
};
}
Key Properties and Components
SfAccumulationChart
- Title: Chart title text
- Height/Width: Chart dimensions
- Theme: Visual theme (Bootstrap5, Material, Fluent, etc.)
- EnableAnimation: Enable/disable load animation
- SelectionMode: Point or Series selection
- Background: Chart background color
AccumulationChartSeries
- DataSource: Data collection to visualize
- XName: Property name for category/label
- YName: Property name for values
- Type: Pie (default), Doughnut, Funnel, Pyramid
- InnerRadius: Doughnut inner radius percentage
- Radius: Overall chart radius
- StartAngle/EndAngle: Arc positioning
- GroupTo: Value/point count threshold for grouping
- GroupMode: Value or Point grouping mode
- Explode/ExplodeIndex: Slice separation on load
AccumulationDataLabelSettings
- Visible: Show/hide data labels
- Name: Property for label text
- Position: Inside or Outside placement
- Format: Value format string
- MaxWidth: Text wrap width
- Template: Custom HTML template
AccumulationChartLegendSettings
- Visible: Show/hide legend
- Position: Top, Bottom, Left, Right
- Height/Width: Legend dimensions
- ToggleVisibility: Enable click to hide/show points
AccumulationChartTooltipSettings
- Enable: Show/hide tooltips
- Format: Tooltip text format
- Header: Custom header text
- Template: Custom HTML template
Public Methods
The SfAccumulationChart component provides the following public methods. For complete method signatures and additional details, see api-reference.md.
ExportAsync
Exports the chart in the specified format.
await chart.ExportAsync(ExportType.PNG, "chart.png");
Parameters:
type (ExportType): PNG, JPEG, SVG, or PDF
fileName (string): Name of the exported file
orientation (PdfPageOrientation?): PDF orientation (Portrait/Landscape), optional
allowDownload (bool): Whether to download the file, default is true
PrintAsync
Prints the chart.
await chart.PrintAsync();
Refresh
Refreshes the chart with optional animation.
chart.Refresh(shouldAnimate: true);
Parameters:
shouldAnimate (bool): Whether to animate the refresh, default is true
SetAnnotationValueAsync
Updates annotation content dynamically.
await chart.SetAnnotationValueAsync(0, "Updated Content");
Parameters:
annotationIndex (double): Index of the annotation to update
content (string): New content for the annotation
Common Use Cases
Market Share Visualization
Use pie or doughnut charts to show competitive market distribution with legends identifying each company.
Sales Pipeline Tracking
Use funnel charts to visualize stage-by-stage conversion in sales processes, showing drop-off at each step.
Organizational Hierarchy
Use pyramid charts to display hierarchical structures like company organization or food chains.
Survey Results Display
Use pie charts with data labels to present survey response distributions with clear percentage values.
Financial Portfolio Composition
Use doughnut charts with center labels to show asset allocation with total value in the center.
Regional Revenue Distribution
Use pie charts with gradients to highlight revenue contribution by geographic regions.
See Also
1---
2name: syncfusion-blazor-accumulation-chart
3description: Implement Syncfusion Blazor Accumulation Chart (SfAccumulationChart) for proportional data visualization. Use this when creating pie charts, doughnut charts, funnel charts, or pyramid charts. This skill covers data labels, legends, tooltips, slice grouping, and part-to-whole visualizations in Blazor applications.
4metadata:
5 author: "Syncfusion Inc"
6 version: "34.1.29"
7 category: "Data Visualization"
8---
9
10# Implementing Syncfusion Blazor Accumulation Charts
11
12**NuGet:** `Syncfusion.Blazor.Charts` + `Syncfusion.Blazor.Themes`
13**Namespace:** `Syncfusion.Blazor.Charts`
14
15A comprehensive guide for implementing the Syncfusion Blazor Accumulation Chart component to create interactive pie, doughnut, funnel, and pyramid charts that visualize proportional and hierarchical data in Blazor applications.
16
17## When to Use This Skill
18
19Use this skill when you need to:
20- **Create pie charts** to show proportional data distribution
21- **Build doughnut charts** with center labels or multiple series
22- **Implement funnel charts** for stage-based data (sales pipeline, conversion rates)
23- **Create pyramid charts** for hierarchical data visualization
24- **Display percentage distributions** and part-to-whole relationships
25- **Visualize market share**, survey results, or categorical proportions
26- **Show composition data** with interactive slicing and legends
27- **Add data labels** with smart positioning and connector lines
28- **Implement center labels** for doughnut charts with dynamic content
29- **Customize appearance** with gradients, themes, and annotations
30- **Group small slices** to improve readability
31- **Handle user interactions** with tooltips, selection, and events
32- **Create accessible charts** with ARIA support and keyboard navigation
33
34## Component Overview
35
36The Syncfusion Blazor Accumulation Chart component specializes in circular and triangular visualizations for proportional data:
37
38- **4 Chart Types:** Pie, Doughnut, Funnel, Pyramid
39- **Data Labels:** Smart positioning, connector lines, templates, text wrapping
40- **Legends:** Customizable positioning, paging, click behavior
41- **Tooltips:** Formatted display, custom templates
42- **Center Labels:** Doughnut-specific feature with dynamic content
43- **Grouping:** Combine small slices into "Others" category
44- **Customization:** Gradients, annotations, themes, colors, borders
45- **Interactivity:** Selection, explosion, hover effects, animations
46- **Accessibility:** WCAG compliance, ARIA support, keyboard navigation
47- **Export:** Print support, image export
48
49## Documentation and Navigation Guide
50
51### Getting Started
52
53📄 **Read:** [references/getting-started.md](references/getting-started.md)
54
55Use this when:
56- Setting up a new Blazor Accumulation Chart project
57- Installing NuGet packages and dependencies
58- Creating your first pie or doughnut chart
59- Understanding basic component structure
60- Working with Visual Studio, VS Code, or .NET CLI
61- Binding data to accumulation charts
62
63Topics covered:
64- Installation prerequisites and system requirements
65- NuGet package installation (Syncfusion.Blazor.Charts)
66- Service registration and namespace imports
67- Theme and script references
68- Basic SfAccumulationChart implementation
69- Data source configuration (XName, YName properties)
70- Adding title, data labels, tooltip, and legend
71- Running the application
72
73---
74
75### Chart Types
76
77📄 **Read:** [references/chart-types.md](references/chart-types.md)
78
79Use this when:
80- Choosing the right chart type for your data
81- Implementing pie charts (default type)
82- Creating doughnut charts with inner radius
83- Building funnel charts for conversion visualization
84- Designing pyramid charts for hierarchical data
85- Understanding type-specific properties
86
87Topics covered:
88- **Pie Chart:** Default circular visualization, when to use
89- **Doughnut Chart:** Inner radius configuration, center content area
90- **Funnel Chart:** Neck dimensions, width/height ratios, data flow
91- **Pyramid Chart:** Linear vs surface mode, base positioning
92- Type property configuration
93- Visual differences and use cases
94- Code examples for each type
95
96---
97
98### Data Labels
99
100📄 **Read:** [references/data-label.md](references/data-label.md)
101
102Use this when:
103- Enabling and customizing data labels
104- Positioning labels inside or outside slices
105- Implementing smart labels for collision avoidance
106- Adding connector lines from labels to slices
107- Customizing label text, format, and templates
108- Handling text wrapping and overflow
109- Using custom data fields for label text
110
111Topics covered:
112- Visible property to enable labels
113- Position options (Inside, Outside)
114- Text wrapping with MaxWidth
115- Smart label positioning
116- Connector line customization (type, length, color, width)
117- Text mapping from data source fields
118- Format patterns (N1, P1, C1 for numbers/percentages/currency)
119- Template customization with HTML and context values
120- Font styling, borders, and backgrounds
121
122---
123
124### Legends
125
126📄 **Read:** [references/legend.md](references/legend.md)
127
128Use this when:
129- Adding legends to accumulation charts
130- Positioning legends (top, bottom, left, right)
131- Customizing legend appearance and behavior
132- Implementing legend paging for many data points
133- Creating custom legend templates
134- Handling legend click events
135
136Topics covered:
137- Enabling legends with Visible property
138- Position and alignment options
139- Legend shape customization
140- Text styling and truncation
141- Toggle visibility behavior on legend click
142- Legend paging configuration
143- Custom templates for legend items
144- Click and hover events
145
146---
147
148### Tooltips
149
150📄 **Read:** [references/tooltip.md](references/tooltip.md)
151
152Use this when:
153- Enabling tooltips on hover
154- Formatting tooltip content
155- Creating custom tooltip templates
156- Styling tooltip appearance
157- Configuring tooltip behavior and animation
158
159Topics covered:
160- Enable property for tooltip activation
161- Format string for value display
162- Header customization
163- Custom templates with HTML
164- Border, fill, and font styling
165- Animation settings
166- Shared tooltips (if applicable)
167
168---
169
170### Center Labels
171
172📄 **Read:** [references/center-label.md](references/center-label.md)
173
174Use this when:
175- Adding text in the center of doughnut charts
176- Displaying static or dynamic center content
177- Customizing center label appearance
178- Showing aggregated data in center
179- Implementing hover-based center text updates
180
181Topics covered:
182- Center label Text property
183- TextStyle customization (font, size, color)
184- Dynamic text with templates
185- Hover-based text updates using events
186- Center label visibility control
187- Use cases and best practices
188
189---
190
191### Customization and Styling
192
193📄 **Read:** [references/customization-styling.md](references/customization-styling.md)
194
195Use this when:
196- Applying gradient fills to slices
197- Grouping small slices into "Others"
198- Adding annotations (text, shapes, images)
199- Handling empty points in data
200- Customizing themes and color palettes
201- Setting border styles and radius
202- Implementing responsive layouts
203- Using adaptive design for mobile
204
205Topics covered:
206- **Gradients:** Radial and linear fills for slices
207- **Grouping:** GroupTo and GroupMode for combining small values
208- **Annotations:** Text, shape, and image annotations with positioning
209- **Empty Points:** Mode options (Zero, Drop, Average, Gap)
210- **Themes:** Built-in themes and custom theme application
211- **Colors:** Custom color palettes and per-point colors
212- **Borders:** Width, color, and dash array
213- **Radius:** Inner radius (doughnut) and overall chart radius
214- **Responsive:** Adaptive layout for different screen sizes
215
216---
217
218### Animation and Events
219
220📄 **Read:** [references/animation-events.md](references/animation-events.md)
221
222Use this when:
223- Configuring chart load animations
224- Handling point selection and click events
225- Responding to mouse hover and leave events
226- Implementing custom interactions
227- Accessing chart lifecycle events
228- Working with series and point rendering events
229
230Topics covered:
231- **Animation:** Enable, duration, delay configuration
232- **Chart Events:** Load, Loaded, BeforeResize, Resized
233- **Point Events:** OnPointClick, OnPointMove, PointRender
234- **Series Events:** SeriesRender, OnLegendClick
235- **Data Label Events:** OnDataLabelRender, TextRender
236- **Selection:** OnSelectionComplete, selection mode
237- **Tooltip Events:** TooltipRender
238- Event data structures and parameters
239- Practical event handling examples
240
241---
242
243### Accessibility and Printing
244
245📄 **Read:** [references/accessibility-printing.md](references/accessibility-printing.md)
246
247Use this when:
248- Implementing WCAG-compliant charts
249- Adding ARIA attributes for screen readers
250- Enabling keyboard navigation
251- Supporting right-to-left (RTL) layouts
252- Implementing print functionality
253- Exporting charts as images
254- Localizing chart text
255
256Topics covered:
257- **Accessibility:** WCAG 2.1 compliance features
258- **ARIA:** Role, label, and description attributes
259- **Keyboard:** Tab navigation and selection
260- **Screen Readers:** Alternative text and descriptions
261- **Printing:** Print method and configuration
262- **Export:** Image export (PNG, JPG, SVG)
263- **RTL:** Right-to-left language support
264- **Localization:** Culture-specific formatting
265
266---
267
268### API Reference
269
270📄 **Read:** [references/api-reference.md](references/api-reference.md)
271
272Use this when:
273
274- Looking up enum values and their exact names
275- Understanding public method signatures and parameters
276- Finding correct property types and default values
277- Troubleshooting API usage issues
278- Referencing quick code patterns
279- Checking critical usage notes and gotchas
280
281Topics covered:
282
283- **Common Enums:** AccumulationType, AccumulationLabelPosition, GroupMode, LegendPosition, ExportType
284- **Key Properties:** Type, InnerRadius, Radius, GroupTo, GroupMode, Visible, Enable
285- **Public Methods:** ExportAsync, PrintAsync, Refresh, SetAnnotationValueAsync
286- **Critical Usage Notes:** Center label restrictions, GroupTo semantics, enum qualification
287- **Common Patterns:** Basic pie, doughnut with center label, grouping examples
288- **Troubleshooting:** Label overlap, center label issues, enum compilation errors
289
290---
291
292## Quick Start Example
293
294Here's a minimal pie chart implementation:
295
296```razor
297@page "/pie-chart"
298@using Syncfusion.Blazor.Charts
299
300<SfAccumulationChart Title="Sales Distribution">
301 <AccumulationChartSeriesCollection>
302 <AccumulationChartSeries DataSource="@SalesData"
303 XName="Product"
304 YName="Sales">
305 <AccumulationDataLabelSettings Visible="true"
306 Name="Product">
307 </AccumulationDataLabelSettings>
308 </AccumulationChartSeries>
309 </AccumulationChartSeriesCollection>
310
311 <AccumulationChartLegendSettings Visible="true">
312 </AccumulationChartLegendSettings>
313</SfAccumulationChart>
314
315@code {
316 public class SalesInfo
317 {
318 public string Product { get; set; }
319 public double Sales { get; set; }
320 }
321
322 public List<SalesInfo> SalesData = new List<SalesInfo>
323 {
324 new SalesInfo { Product = "Product A", Sales = 35 },
325 new SalesInfo { Product = "Product B", Sales = 28 },
326 new SalesInfo { Product = "Product C", Sales = 22 },
327 new SalesInfo { Product = "Product D", Sales = 15 }
328 };
329}
330```
331
332## Common Patterns
333
334### Doughnut Chart with Center Label
335
336```razor
337<SfAccumulationChart Title="Revenue by Region">
338 <AccumulationChartSeriesCollection>
339 <AccumulationChartSeries DataSource="@RevenueData"
340 XName="Region"
341 YName="Revenue"
342 InnerRadius="40%">
343 <AccumulationDataLabelSettings Visible="true" Position="Syncfusion.Blazor.Charts.AccumulationLabelPosition.Outside">
344 <AccumulationChartConnector Length="20px">
345 </AccumulationChartConnector>
346 </AccumulationDataLabelSettings>
347 <AccumulationChartCenterLabel
348 Text="Total<br/>$1.2M">
349 <AccumulationChartCenterLabelFont
350 Size="16px"
351 FontWeight="600">
352 </AccumulationChartCenterLabelFont>
353 </AccumulationChartCenterLabel>
354 </AccumulationChartSeries>
355 </AccumulationChartSeriesCollection>
356</SfAccumulationChart>
357```
358
359### Funnel Chart for Conversion
360
361```razor
362<SfAccumulationChart Title="Sales Funnel">
363 <AccumulationChartSeriesCollection>
364 <AccumulationChartSeries DataSource="@ConversionData"
365 XName="Stage"
366 YName="Count"
367 Type="Syncfusion.Blazor.Charts.AccumulationType.Funnel"
368 NeckWidth="25%"
369 NeckHeight="10%">
370 <AccumulationDataLabelSettings Visible="true" Name="Stage">
371 </AccumulationDataLabelSettings>
372 </AccumulationChartSeries>
373 </AccumulationChartSeriesCollection>
374</SfAccumulationChart>
375```
376
377### Grouped Pie Chart with Gradients
378
379```razor
380<SfAccumulationChart Title="Market Share Analysis">
381 <AccumulationChartSeriesCollection>
382 <AccumulationChartSeries DataSource="@MarketData"
383 XName="Company"
384 YName="Share"
385 GroupTo="5"
386 GroupMode="Syncfusion.Blazor.Charts.GroupMode.Value">
387 <AccumulationDataLabelSettings Visible="true" Position="Syncfusion.Blazor.Charts.AccumulationLabelPosition.Outside">
388 </AccumulationDataLabelSettings>
389 </AccumulationChartSeries>
390 </AccumulationChartSeriesCollection>
391 <AccumulationChartLegendSettings Visible="true" Position="Syncfusion.Blazor.Charts.LegendPosition.Right">
392 </AccumulationChartLegendSettings>
393</SfAccumulationChart>
394
395@code {
396 // Data source with gradient applied
397 public List<MarketInfo> MarketData = new List<MarketInfo>
398 {
399 new MarketInfo { Company = "Company A", Share = 35 },
400 new MarketInfo { Company = "Company B", Share = 20 },
401 new MarketInfo { Company = "Company C", Share = 15 },
402 new MarketInfo { Company = "Others", Share = 30 }
403 };
404}
405```
406
407## Key Properties and Components
408
409### SfAccumulationChart
410- **Title:** Chart title text
411- **Height/Width:** Chart dimensions
412- **Theme:** Visual theme (Bootstrap5, Material, Fluent, etc.)
413- **EnableAnimation:** Enable/disable load animation
414- **SelectionMode:** Point or Series selection
415- **Background:** Chart background color
416
417### AccumulationChartSeries
418- **DataSource:** Data collection to visualize
419- **XName:** Property name for category/label
420- **YName:** Property name for values
421- **Type:** Pie (default), Doughnut, Funnel, Pyramid
422- **InnerRadius:** Doughnut inner radius percentage
423- **Radius:** Overall chart radius
424- **StartAngle/EndAngle:** Arc positioning
425- **GroupTo:** Value/point count threshold for grouping
426- **GroupMode:** Value or Point grouping mode
427- **Explode/ExplodeIndex:** Slice separation on load
428
429### AccumulationDataLabelSettings
430- **Visible:** Show/hide data labels
431- **Name:** Property for label text
432- **Position:** Inside or Outside placement
433- **Format:** Value format string
434- **MaxWidth:** Text wrap width
435- **Template:** Custom HTML template
436
437### AccumulationChartLegendSettings
438- **Visible:** Show/hide legend
439- **Position:** Top, Bottom, Left, Right
440- **Height/Width:** Legend dimensions
441- **ToggleVisibility:** Enable click to hide/show points
442
443### AccumulationChartTooltipSettings
444- **Enable:** Show/hide tooltips
445- **Format:** Tooltip text format
446- **Header:** Custom header text
447- **Template:** Custom HTML template
448
449## Public Methods
450
451The `SfAccumulationChart` component provides the following public methods. For complete method signatures and additional details, see [api-reference.md](references/api-reference.md).
452
453### ExportAsync
454Exports the chart in the specified format.
455
456```csharp
457await chart.ExportAsync(ExportType.PNG, "chart.png");
458```
459
460**Parameters:**
461- `type` (ExportType): PNG, JPEG, SVG, or PDF
462- `fileName` (string): Name of the exported file
463- `orientation` (PdfPageOrientation?): PDF orientation (Portrait/Landscape), optional
464- `allowDownload` (bool): Whether to download the file, default is true
465
466### PrintAsync
467Prints the chart.
468
469```csharp
470await chart.PrintAsync();
471```
472
473### Refresh
474Refreshes the chart with optional animation.
475
476```csharp
477chart.Refresh(shouldAnimate: true);
478```
479
480**Parameters:**
481- `shouldAnimate` (bool): Whether to animate the refresh, default is true
482
483### SetAnnotationValueAsync
484Updates annotation content dynamically.
485
486```csharp
487await chart.SetAnnotationValueAsync(0, "Updated Content");
488```
489
490**Parameters:**
491- `annotationIndex` (double): Index of the annotation to update
492- `content` (string): New content for the annotation
493
494## Common Use Cases
495
496### Market Share Visualization
497**Use pie or doughnut charts** to show competitive market distribution with legends identifying each company.
498
499### Sales Pipeline Tracking
500**Use funnel charts** to visualize stage-by-stage conversion in sales processes, showing drop-off at each step.
501
502### Organizational Hierarchy
503**Use pyramid charts** to display hierarchical structures like company organization or food chains.
504
505### Survey Results Display
506**Use pie charts with data labels** to present survey response distributions with clear percentage values.
507
508### Financial Portfolio Composition
509**Use doughnut charts with center labels** to show asset allocation with total value in the center.
510
511### Regional Revenue Distribution
512**Use pie charts with gradients** to highlight revenue contribution by geographic regions.
513
514## See Also
515
516- [Syncfusion Blazor Charts Overview](https://blazor.syncfusion.com/documentation/accumulation-chart)
517- [Accumulation Chart API Reference](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.SfAccumulationChart.html)
518- [Blazor Accumulation Chart Demos](https://blazor.syncfusion.com/demos/chart/pie)