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