
Syncfusion Blazor Accumulation Chart
- 250 installs
- 4 repo stars
- Updated July 28, 2026
- syncfusion/blazor-ui-components-skills
Use syncfusion-blazor-accumulation-chart for development tasks
About
syncfusion-blazor-accumulation-chart: A skill for development. This provides functionality for development workflows.
- syncfusion-blazor-accumulation-chart
Syncfusion Blazor Accumulation Chart by the numbers
- 250 all-time installs (skills.sh)
- +14 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #1,523 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/syncfusion/blazor-ui-components-skills --skill syncfusion-blazor-accumulation-chartAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 250 |
|---|---|
| repo stars | ★ 4 |
| Last updated | July 28, 2026 |
| Repository | syncfusion/blazor-ui-components-skills ↗ |
What it does
Use syncfusion-blazor-accumulation-chart for development tasks
Files
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 PDFfileName(string): Name of the exported fileorientation(PdfPageOrientation?): PDF orientation (Portrait/Landscape), optionalallowDownload(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 updatecontent(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
Table of Contents
- Accessibility Overview
- WAI-ARIA Attributes
- Adding Custom ARIA Labels
- Keyboard Navigation
- Keyboard Shortcuts
- Enable Keyboard Navigation
- Focus Management
- Screen Reader Support
- Accessible Data Representation
- Data Table Alternative
- High Contrast Mode
- High Contrast Themes
- Custom High Contrast Colors
- Right-to-Left (RTL) Support
- Enable RTL
- Mobile Accessibility
- Touch-Optimized Settings
- Printing
- Basic Printing
- Print with Event Handling
- Print Configuration
- Image Export
- Export as PNG
- Export Types
- Export with Options
- Export Event
- Localization
- Basic Localization
- Custom Localization
- Accessibility Testing
- Automated Testing Tools
- Manual Testing Checklist
- Best Practices
- Content
- Visual Design
- Interaction
- Documentation
- See Also
Accessibility and Printing
This guide covers accessibility features for inclusive data visualization and printing/export capabilities for Syncfusion Blazor Accumulation Charts.
Accessibility Overview
Syncfusion Blazor Accumulation Charts comply with:
- WCAG 2.2 (AA level)
- Section 508
- ADA standards
- WAI-ARIA patterns
Supported accessibility features:
- Screen reader support
- Keyboard navigation
- High contrast themes
- Right-to-left (RTL) support
- Mobile device accessibility
- Color contrast compliance
WAI-ARIA Attributes
Charts automatically include appropriate ARIA attributes:
Roles:
img- Chart containerbutton- Interactive elementsregion- Chart areas
Attributes:
aria-label- Descriptive labelsaria-hidden- Hidden decorative elementsaria-pressed- Legend toggle state
Adding Custom ARIA Labels
<SfAccumulationChart Title="Sales Distribution"
AriaLabel="Sales distribution pie chart showing product sales percentages">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@Data" XName="Product" YName="Sales">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>Best practices:
- Provide meaningful titles
- Include data summary in aria-label
- Describe chart type and purpose
- Mention key insights
Keyboard Navigation
Full keyboard support for non-mouse users.
Keyboard Shortcuts
| Windows | Mac | Action |
|---|---|---|
| <kbd>Alt</kbd> + <kbd>J</kbd> | <kbd>⌥</kbd> + <kbd>J</kbd> | Focus chart |
| <kbd>Tab</kbd> | <kbd>Tab</kbd> | Next element |
| <kbd>Shift</kbd> + <kbd>Tab</kbd> | <kbd>⇧</kbd> + <kbd>Tab</kbd> | Previous element |
| <kbd>↓</kbd> | <kbd>↓</kbd> | Next data point (left) |
| <kbd>↑</kbd> | <kbd>↑</kbd> | Previous data point (right) |
| <kbd>↓</kbd> / <kbd>←</kbd> | <kbd>↓</kbd> / <kbd>←</kbd> | Previous legend item |
| <kbd>↑</kbd> / <kbd>→</kbd> | <kbd>↑</kbd> / <kbd>→</kbd> | Next legend item |
| <kbd>Enter</kbd> / <kbd>Space</kbd> | <kbd>Enter</kbd> / <kbd>Space</kbd> | Toggle series visibility |
| <kbd>ESC</kbd> | <kbd>Esc</kbd> | Close tooltip |
| <kbd>Ctrl</kbd> + <kbd>P</kbd> | <kbd>⌘</kbd> + <kbd>P</kbd> | Print chart |
Enable Keyboard Navigation
<SfAccumulationChart EnableKeyboardNavigation="true">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@Data" XName="X" YName="Y">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>Focus Management
<SfAccumulationChart @ref="ChartRef">
</SfAccumulationChart>
@code {
private SfAccumulationChart ChartRef;
private async Task FocusChart()
{
// Programmatically focus the chart
await ChartRef.FocusAsync();
}
}Screen Reader Support
Charts provide meaningful content to screen readers.
Accessible Data Representation
<SfAccumulationChart Title="Q4 Sales by Region"
AriaLabel="Pie chart showing Q4 2025 sales distribution across four regions">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@RegionData"
XName="Region"
YName="Sales"
Name="Sales by Region">
<AccumulationDataLabelSettings Visible="true" Name="Region">
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<AccumulationChartLegendSettings Visible="true">
</AccumulationChartLegendSettings>
</SfAccumulationChart>Screen reader announcements:
- Chart title and type
- Series name and count
- Point categories and values
- Legend items
- Interaction feedback
Data Table Alternative
Provide tabular data for screen readers:
<div role="region" aria-label="Sales data table">
<table>
<caption>Q4 Sales by Region</caption>
<thead>
<tr>
<th>Region</th>
<th>Sales ($M)</th>
<th>Percentage</th>
</tr>
</thead>
<tbody>
@foreach (var item in RegionData)
{
<tr>
<td>@item.Region</td>
<td>@item.Sales</td>
<td>@item.Percentage%</td>
</tr>
}
</tbody>
</table>
</div>
<SfAccumulationChart Title="Q4 Sales by Region" aria-describedby="sales-table">
<!-- chart configuration -->
</SfAccumulationChart>High Contrast Mode
Support for users with visual impairments.
High Contrast Themes
<SfAccumulationChart Theme="Syncfusion.Blazor.Theme.HighContrast">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@Data" XName="X" YName="Y">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>Available high contrast themes:
Syncfusion.Blazor.Theme.HighContrast- Dark background, high contrast colorsSyncfusion.Blazor.Theme.HighContrastLight- Light background, high contrast colors
Custom High Contrast Colors
<AccumulationChartSeries Palettes="@HighContrastPalette">
</AccumulationChartSeries>
@code {
private string[] HighContrastPalette = new string[]
{
"#FFFF00", // Yellow
"#00FFFF", // Cyan
"#FF00FF", // Magenta
"#00FF00", // Lime
"#FFFFFF" // White
};
}Design guidelines:
- Minimum 4.5:1 contrast ratio (WCAG AA)
- 7:1 for enhanced contrast (WCAG AAA)
- Avoid color-only information encoding
- Provide pattern fills as alternatives
Right-to-Left (RTL) Support
For Arabic, Hebrew, and other RTL languages.
Enable RTL
<SfAccumulationChart EnableRtl="true">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@Data" XName="Category" YName="Value">
<AccumulationDataLabelSettings Visible="true">
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<AccumulationChartLegendSettings Visible="true">
</AccumulationChartLegendSettings>
</SfAccumulationChart>RTL behavior:
- Legend positioned on left by default
- Data labels mirrored
- Slice order reversed
- Text alignment adjusted
Mobile Accessibility
Ensure touch-friendly and accessible on mobile devices.
Touch-Optimized Settings
<SfAccumulationChart EnableAdaptiveUI="true" Height="350px">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@Data" XName="X" YName="Y">
<AccumulationDataLabelSettings Visible="false">
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<AccumulationChartTooltipSettings Enable="true">
</AccumulationChartTooltipSettings>
<AccumulationChartLegendSettings Visible="true" Position="Syncfusion.Blazor.Charts.LegendPosition.Bottom">
</AccumulationChartLegendSettings>
</SfAccumulationChart>Mobile best practices:
- Larger touch targets (44x44px minimum)
- Bottom-positioned legend
- Tooltips instead of data labels
- Simplified interactions
Printing
Print charts directly from the browser.
Basic Printing
<SfAccumulationChart @ref="ChartRef">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@Data" XName="Product" YName="Sales">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
<button @onclick="PrintChart">Print Chart</button>
@code {
private SfAccumulationChart ChartRef;
private async Task PrintChart()
{
await ChartRef.PrintAsync();
}
}Print with Event Handling
<SfAccumulationChart @ref="ChartRef">
<AccumulationChartEvents OnPrintComplete="PrintCompleted">
</AccumulationChartEvents>
<!-- series configuration -->
</SfAccumulationChart>
@code {
private void PrintCompleted()
{
Console.WriteLine("Print operation completed");
// Log, notify user, etc.
}
}Print Configuration
@code {
private async Task PrintWithSettings()
{
// Configure print settings
await ChartRef.PrintAsync();
// Browser's print dialog opens with:
// - Chart rendered at current size
// - Background colors preserved
// - High-resolution output
}
}Image Export
Export charts as PNG, JPEG, SVG, or PDF.
Export as PNG
<SfAccumulationChart @ref="ChartRef">
<!-- chart configuration -->
</SfAccumulationChart>
<button @onclick="ExportPNG">Export as PNG</button>
@code {
private SfAccumulationChart ChartRef;
private async Task ExportPNG()
{
await ChartRef.ExportAsync(Syncfusion.Blazor.Charts.ExportType.PNG, "SalesChart");
}
}Export Types
@code {
private async Task ExportChart(Syncfusion.Blazor.Charts.ExportType type)
{
string filename = $"Chart_{DateTime.Now:yyyyMMdd}";
await ChartRef.ExportAsync(type, filename);
}
// Export types:
// Syncfusion.Blazor.Charts.ExportType.PNG
// Syncfusion.Blazor.Charts.ExportType.JPEG
// Syncfusion.Blazor.Charts.ExportType.SVG
// Syncfusion.Blazor.Charts.ExportType.PDF
}Export with Options
@code {
private async Task ExportWithOptions()
{
var exportSettings = new ExportSettings
{
Type = Syncfusion.Blazor.Charts.ExportType.PNG,
FileName = "HighResSalesChart",
Orientation = PdfPageOrientation.Landscape,
Width = 1920,
Height = 1080
};
await ChartRef.ExportAsync(exportSettings);
}
}Export Event
<AccumulationChartEvents OnExportComplete="ExportCompleted">
</AccumulationChartEvents>
@code {
private void ExportCompleted(ExportEventArgs args)
{
Console.WriteLine($"Exported as {args.Type}");
// Show success message, log event
}
}Localization
Translate chart text for international audiences.
Basic Localization
<SfAccumulationChart Locale="de-DE">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@Data" XName="Kategorie" YName="Wert">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>Custom Localization
@code {
protected override void OnInitialized()
{
var culture = new CultureInfo("es-ES");
CultureInfo.DefaultThreadCurrentCulture = culture;
CultureInfo.DefaultThreadCurrentUICulture = culture;
}
}Accessibility Testing
Automated Testing Tools
Axe DevTools:
- Install browser extension
- Scan page with chart
- Review accessibility violations
- Fix issues and retest
Lighthouse (Chrome DevTools):
- Open DevTools
- Run Lighthouse audit
- Review Accessibility score
- Address findings
Manual Testing Checklist
- [ ] Navigate entire chart with keyboard only
- [ ] Verify screen reader announcements
- [ ] Test with high contrast mode enabled
- [ ] Check color contrast ratios (4.5:1 minimum)
- [ ] Ensure touch targets 44x44px (mobile)
- [ ] Verify RTL layout (if applicable)
- [ ] Test print functionality
- [ ] Validate ARIA attributes
- [ ] Review focus indicators
- [ ] Check tooltip keyboard accessibility
Best Practices
Content
- Provide descriptive titles
- Include data summaries for screen readers
- Use clear, concise labels
- Avoid jargon in accessibility text
Visual Design
- Maintain WCAG AA contrast ratios (4.5:1)
- Don't rely solely on color
- Use patterns or textures as backup
- Provide legends for color-coded data
Interaction
- Support full keyboard navigation
- Provide clear focus indicators
- Allow dismissing tooltips with ESC
- Enable accessible selection modes
Documentation
- Document keyboard shortcuts
- Provide data table alternatives
- Include accessibility statement
- Test with assistive technologies
See Also
- WCAG 2.2 Guidelines
- Syncfusion Accessibility Documentation
- Keyboard Navigation - Event handling
- Tooltips - Accessible data display
- Data Labels - Alternative to tooltips
Animation and Events
Table of Contents
- Animation
- Enable/Disable Animation
- Animation Behavior
- Disable Animation on Programmatic Refresh
- Custom Animation Timing
- Chart Lifecycle Events
- OnLoad
- Loaded
- BeforeResize / Resized
- SizeChanged
- Point and Series Events
- OnPointClick
- OnPointMove
- SeriesRender
- Rendering Events
- OnPointRender
- OnDataLabelRender
- OnLegendItemRender
- TextRender
- Selection Events
- OnSelectionComplete
- Selection Pattern
- Interaction Events
- OnLegendClick
- TooltipRender
- OnExportComplete
- OnPrintComplete
- Event Patterns
- Cancellable Events
- Event Chaining
- Common Use Cases
- Interactive Filtering
- Drill-Down
- Real-Time Updates with Controlled Animation
- Conditional Styling
- Best Practices
- Performance
- User Experience
- Maintainability
Animation
Control chart load and refresh animations for visual appeal and user engagement.
Enable/Disable Animation
<AccumulationChartSeries DataSource="@Data" XName="Category" YName="Value">
<AccumulationChartAnimation Enable="true"
Duration="1500"
Delay="0">
</AccumulationChartAnimation>
</AccumulationChartSeries>Properties:
- Enable:
true(animated),false(instant render) - Duration: Animation length in milliseconds (default: 1000ms)
- Delay: Wait time before starting (milliseconds)
Animation Behavior
On Load:
- Slices/segments draw from center outward
- Smooth fade-in effect
- Sequential rendering feel
On Refresh:
- Smooth transition between old and new values
- Morphing animation for data changes
Disable Animation on Programmatic Refresh
<SfAccumulationChart @ref="ChartRef">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@Data" XName="X" YName="Y">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
<button @onclick="RefreshChart">Refresh Chart</button>
@code {
private SfAccumulationChart ChartRef;
private async Task RefreshChart()
{
// Refresh without animation
await ChartRef.Refresh(false);
}
}When to disable animations:
- Rapid data updates (real-time dashboards)
- Performance-critical scenarios
- Accessibility requirements (motion sensitivity)
- Testing and automation
Custom Animation Timing
<!-- Slow, dramatic entrance -->
<AccumulationChartAnimation Enable="true" Duration="2000" Delay="500">
</AccumulationChartAnimation>
<!-- Quick, snappy animation -->
<AccumulationChartAnimation Enable="true" Duration="600" Delay="0">
</AccumulationChartAnimation>Chart Lifecycle Events
Events fired during chart initialization, rendering, and resize.
OnLoad
Fires before chart rendering begins:
<AccumulationChartEvents OnLoad="ChartLoad">
</AccumulationChartEvents>
@code {
private void ChartLoad(IAccumulationLoadedEventArgs args)
{
// Modify chart properties before rendering
// Access args.AccumulationChart for chart instance
}
}Use cases:
- Dynamic theme application
- Loading external data
- Pre-render configuration
Loaded
Fires after chart fully renders:
<AccumulationChartEvents Loaded="ChartLoaded">
</AccumulationChartEvents>
@code {
private void ChartLoaded(IAccumulationLoadedEventArgs args)
{
Console.WriteLine("Chart rendering complete");
// Perform post-render operations
}
}BeforeResize / Resized
Track chart dimension changes:
<AccumulationChartEvents BeforeResize="OnBeforeResize"
Resized="OnResized">
</AccumulationChartEvents>
@code {
private void OnBeforeResize(IAccumulationResizeEventArgs args)
{
// Before resize starts
// args.PreviousSize, args.CurrentSize
}
private void OnResized(IAccumulationResizeEventArgs args)
{
// After resize completes
// Recalculate layout, adjust responsive behavior
}
}SizeChanged
Alternative resize event:
<AccumulationChartEvents SizeChanged="OnSizeChanged">
</AccumulationChartEvents>
@code {
private void OnSizeChanged(AccumulationResizeEventArgs args)
{
// args.CurrentSize.Height, args.CurrentSize.Width
}
}Point and Series Events
Interact with individual data points and series.
OnPointClick
User clicks a slice/segment:
<AccumulationChartEvents OnPointClick="PointClicked">
</AccumulationChartEvents>
@code {
private void PointClicked(AccumulationPointEventArgs args)
{
string category = args.Point.X.ToString();
double value = args.Point.Y;
Console.WriteLine($"Clicked: {category} = {value}");
// Navigate, show details, filter data, etc.
}
}Event data:
Point.X- Category valuePoint.Y- Numeric valuePoint.Index- Point index in seriesPoint.Color- Slice fill color
OnPointMove
Mouse hovers over a point:
<AccumulationChartEvents OnPointMove="PointHovered">
</AccumulationChartEvents>
@code {
private void PointHovered(AccumulationPointEventArgs args)
{
// Update external UI, preview data, etc.
CurrentHoveredCategory = args.Point.X.ToString();
}
private string CurrentHoveredCategory = "";
}SeriesRender
Customize series before rendering:
<AccumulationChartEvents SeriesRender="OnSeriesRender">
</AccumulationChartEvents>
@code {
private void OnSeriesRender(AccumulationSeriesRenderEventArgs args)
{
// Modify series properties
// args.Series.InnerRadius, args.Series.Radius, etc.
}
}Rendering Events
Customize visual elements during rendering.
OnPointRender
Modify individual point appearance:
<AccumulationChartEvents OnPointRender="CustomizePoint">
</AccumulationChartEvents>
@code {
private void CustomizePoint(AccumulationPointRenderEventArgs args)
{
// Conditional coloring
if (args.Point.Y < 10)
{
args.Fill = "#ff0000"; // Red for low values
}
else if (args.Point.Y > 30)
{
args.Fill = "#00ff00"; // Green for high values
}
// Apply gradient
args.Fill = new AccumulationChartLinearGradient { /* gradient config */ };
// Set border
args.Border = new { Width = 2, Color = "#000" };
}
}Use cases:
- Conditional formatting
- Per-point gradients
- Dynamic borders
- Highlighting specific data
OnDataLabelRender
Customize data label appearance:
<AccumulationChartEvents OnDataLabelRender="CustomizeLabel">
</AccumulationChartEvents>
@code {
private void CustomizeLabel(AccumulationTextRenderEventArgs args)
{
// Modify label text
args.Text = $"{args.Point.X}: {args.Point.Y}%";
// Conditional styling
if (args.Point.Y > 30)
{
args.Color = "red";
args.Font = new AccumulationChartFont { Size = "16px", FontWeight = "bold" };
}
}
}OnLegendItemRender
Customize legend items:
<AccumulationChartEvents OnLegendItemRender="CustomizeLegend">
</AccumulationChartEvents>
@code {
private void CustomizeLegend(AccumulationLegendRenderEventArgs args)
{
// Modify legend text
args.Text = $"{args.Text} ({args.Shape})";
// Change legend shape
args.Shape = LegendShape.Circle;
// Conditional styling
args.Fill = GetCategoryColor(args.Text);
}
}TextRender
General text rendering event:
<AccumulationChartEvents TextRender="OnTextRender">
</AccumulationChartEvents>
@code {
private void OnTextRender(AccumulationTextRenderEventArgs args)
{
// Apply to all chart text (title, labels, etc.)
}
}Selection Events
Handle point/series selection.
OnSelectionComplete
Fires after selection completes:
<SfAccumulationChart SelectionMode="Syncfusion.Blazor.Charts.AccumulationSelectionMode.Point">
<AccumulationChartEvents OnSelectionComplete="SelectionMade">
</AccumulationChartEvents>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@Data" XName="X" YName="Y">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
@code {
private void SelectionMade(AccumulationSelectionCompleteEventArgs args)
{
// args.SelectedDataValues - array of selected points
var selectedCategories = args.SelectedDataValues.Select(p => p.X).ToList();
// Filter data, show details, update other components
}
}Selection modes:
Syncfusion.Blazor.Charts.AccumulationSelectionMode.Point- Select individual slicesSyncfusion.Blazor.Charts.AccumulationSelectionMode.Series- Select entire series
Selection Pattern
<SfAccumulationChart SelectionMode="Syncfusion.Blazor.Charts.AccumulationSelectionMode.Point"
SelectionPattern="Syncfusion.Blazor.Charts.SelectionPattern.DiagonalForward"
HighlightMode="Syncfusion.Blazor.Charts.HighlightMode.Point"
HighlightPattern="Syncfusion.Blazor.Charts.SelectionPattern.Dots">Interaction Events
Track user interactions with the chart.
OnLegendClick
User clicks legend item:
<AccumulationChartEvents OnLegendClick="LegendClicked">
</AccumulationChartEvents>
@code {
private void LegendClicked(AccumulationLegendClickEventArgs args)
{
string legendText = args.LegendText;
bool isVisible = args.LegendVisible;
// Toggle visibility, filter data, navigate
// Cancel default behavior
args.Cancel = true; // Prevent toggling visibility
}
}TooltipRender
Customize tooltip before display:
<AccumulationChartEvents TooltipRender="CustomizeTooltip">
</AccumulationChartEvents>
@code {
private void CustomizeTooltip(AccumulationTooltipRenderEventArgs args)
{
// Modify tooltip content
args.Text = $"<b>{args.Point.X}</b><br/>Value: {args.Point.Y}<br/>Share: {args.Point.Percentage}%";
// Change tooltip header
args.HeaderText = "Sales Data";
// Custom styling
args.TextStyle = new AccumulationChartFont
{
Color = "#fff",
Size = "14px",
FontFamily = "Segoe UI"
};
}
}OnExportComplete
Fires after chart export finishes:
<AccumulationChartEvents OnExportComplete="ExportDone">
</AccumulationChartEvents>
@code {
private void ExportDone(ExportEventArgs args)
{
Console.WriteLine($"Export completed: {args.Type}");
}
}OnPrintComplete
Fires after print operation:
<AccumulationChartEvents OnPrintComplete="PrintDone">
</AccumulationChartEvents>
@code {
private void PrintDone()
{
Console.WriteLine("Print completed");
}
}Event Patterns
Cancellable Events
Some events allow preventing default behavior:
@code {
private void OnPointRender(AccumulationPointRenderEventArgs args)
{
if (args.Point.X == "Exclude")
{
args.Cancel = true; // Don't render this point
}
}
}Event Chaining
Combine events for complex workflows:
<AccumulationChartEvents OnPointClick="PointClicked"
OnSelectionComplete="SelectionMade"
OnDataLabelRender="CustomizeLabel">
</AccumulationChartEvents>
@code {
private void PointClicked(AccumulationPointEventArgs args)
{
SelectedPoint = args.Point;
}
private void SelectionMade(AccumulationSelectionCompleteEventArgs args)
{
UpdateDashboard(args.SelectedDataValues);
}
private void CustomizeLabel(AccumulationTextRenderEventArgs args)
{
if (SelectedPoint != null && args.Point.Index == SelectedPoint.Index)
{
args.Color = "red"; // Highlight selected point's label
}
}
}Common Use Cases
Interactive Filtering
@code {
private List<ChartData> FullData = /* all data */;
private List<ChartData> FilteredData;
private void PointClicked(AccumulationPointEventArgs args)
{
string category = args.Point.X.ToString();
FilteredData = FullData.Where(d => d.Category == category).ToList();
StateHasChanged();
}
}Drill-Down
@code {
private void PointClicked(AccumulationPointEventArgs args)
{
NavigationManager.NavigateTo($"/details/{args.Point.X}");
}
}Real-Time Updates with Controlled Animation
@code {
private async Task UpdateData()
{
Data = await FetchNewData();
await ChartRef.Refresh(false); // No animation for frequent updates
}
}Conditional Styling
@code {
private void CustomizePoint(AccumulationPointRenderEventArgs args)
{
if (args.Point.Y > Threshold)
{
args.Fill = "#00ff00";
args.Border = new { Width = 3, Color = "#006600" };
}
}
}Best Practices
Performance
- Avoid heavy computations in render events
- Use
Cancel = trueto skip unnecessary renders - Throttle frequent updates
- Disable animation for rapid data changes
User Experience
- Use animations for initial load (engaging)
- Disable for subsequent updates (clarity)
- Provide feedback on interactions
- Keep event handlers responsive
Maintainability
- Separate event logic from UI code
- Use typed event args for IntelliSense
- Document complex event chains
- Test event scenarios thoroughly
Accumulation Chart API Reference
This document provides a concise reference for the public API surface of the Syncfusion Blazor SfAccumulationChart and commonly used related types. It covers enum values, public methods, important usage notes, and quick code examples.
Common Enums
AccumulationTypePieFunnelPyramid
AccumulationLabelPosition(akaAccumulationDataLabelSettings.Position)InsideOutside
GroupModeValue(group by value threshold)Point(group by point count)
LegendPositionTopBottomLeftRight
ExportTypePNGJPEGSVGPDF
Notes: When specifying enum values in markup, use fully-qualified names if necessary (for example Syncfusion.Blazor.Charts.AccumulationType.Pie) in contexts where the namespace is ambiguous.
Key Component Properties (summary)
AccumulationChartSeries.Type(AccumulationType) — Pie, Funnel, Pyramid.AccumulationChartSeries.InnerRadius(string) — Inner radius for doughnut charts (e.g. "40%").AccumulationChartSeries.Radius(string) — Overall slice radius (e.g. "80%").AccumulationChartSeries.GroupTo(int or double) — Value or point count threshold used withGroupMode.AccumulationChartSeries.GroupMode(GroupMode) —ValueorPoint.AccumulationDataLabelSettings.Visible(bool) — Show/hide data labels.AccumulationChartLegendSettings.Visible(bool) — Show/hide legend.AccumulationChartTooltipSettings.Enable(bool) — Enable/disable tooltips.
Theme Enum
The SfAccumulationChart component supports the Theme property which uses the Syncfusion.Blazor.Theme enum.
IMPORTANT: The enum name is Theme, NOT AccumulationChartTheme. Use it as Theme="Syncfusion.Blazor.Theme.Material" or Theme="Theme.Material" (with proper using directive).
public enum Theme
{
Material,
Fabric,
Bootstrap,
Bootstrap4,
HighContrastLight,
MaterialDark,
FabricDark,
BootstrapDark,
Bootstrap4Dark,
HighContrast,
Tailwind,
TailwindDark,
Bootstrap5,
Bootstrap5Dark,
Fluent,
FluentDark,
Material3,
Material3Dark
}Usage Example:
<SfAccumulationChart Title="Sales Distribution" Theme="Syncfusion.Blazor.Theme.Bootstrap5">
<!-- chart content -->
</SfAccumulationChart>Public Methods
The SfAccumulationChart component exposes a small set of useful public methods. Typical usage calls these from code-behind or event handlers.
Task ExportAsync(ExportType type, string fileName, PdfPageOrientation? orientation = null, bool allowDownload = true)- Exports the chart to the requested format. For
PDF,orientationmay be specified. - Example:
await chart.ExportAsync(ExportType.PNG, "chart.png");
Task PrintAsync()- Invokes the browser print dialog for the chart display area.
- Example:
await chart.PrintAsync();
void Refresh(bool shouldAnimate = true)- Refreshes/redraws the chart. Pass
falseto skip animation. - Example:
chart.Refresh(false);
Task SetAnnotationValueAsync(double annotationIndex, string content)- Updates the content of an annotation at runtime.
- Example:
await chart.SetAnnotationValueAsync(0, "Updated content");
Notes: The component instance (for calling instance methods) is usually obtained by assigning @ref to the SfAccumulationChart in Razor markup.
Critical Usage Notes and Gotchas
- Center labels apply only to Doughnut charts:
AccumulationChartCenterLabelcontent is meaningful whenInnerRadiusis set (doughnut). Using center-label markup for non-doughnut series will have no effect. GroupTosemantics depend onGroupMode: whenGroupModeisValue,GroupTois treated as the numeric threshold to group smaller values into "Others"; whenPoint, it defines the point count to group.- Data label
Positionmust be set using the enum (e.g.Syncfusion.Blazor.Charts.AccumulationLabelPosition.Outside) if the context doesn't include theSyncfusion.Blazor.Chartsnamespace. - Legend visibility toggling (
ToggleVisibility) and click behavior are controlled by legend settings; ensureToggleVisibilityis enabled when you expect legend-item clicks to hide/show points. - Exporting large charts or complex templates may increase memory usage in the browser; prefer vector formats (SVG/PDF) when high fidelity is required.
Common Patterns and Examples
Basic pie chart
<SfAccumulationChart @ref="chart" Title="Sales">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@SalesData" XName="Product" YName="Sales">
<AccumulationDataLabelSettings Visible="true"/>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<AccumulationChartLegendSettings Visible="true"/>
</SfAccumulationChart>
@code {
SfAccumulationChart chart;
List<object> SalesData = new List<object> { /* ... */ };
}Doughnut with center label and export
<AccumulationChartSeries Type="Syncfusion.Blazor.Charts.AccumulationType.Pie" InnerRadius="40%" DataSource="@Data" XName="Category" YName="Value">
<AccumulationDataLabelSettings Visible="true" Position="Syncfusion.Blazor.Charts.AccumulationLabelPosition.Outside" />
<AccumulationChartCenterLabel Text="Total<br/>$1.2M" />
</AccumulationChartSeries>
@code {
SfAccumulationChart chartRef;
async Task ExportPng() {
await chartRef.ExportAsync(ExportType.PNG, "doughnut.png");
}
}Grouping small slices
<AccumulationChartSeries GroupTo="5" GroupMode="Syncfusion.Blazor.Charts.GroupMode.Value" />Zoom/interaction note: Accumulation charts are non-cartesian; pinch/zoom interactions available for Cartesian charts are not applicable to accumulation charts. Use selection, explosion, and tooltip settings for interactivity instead.
Troubleshooting
- If labels overlap badly, enable smart labels (
AccumulationDataLabelSettingswith smart positioning) or move labels outside usingPosition=Outside. - If center label does not appear, verify
Type=PieandInnerRadiusis a non-empty percentage. - If a fully-qualified enum compiles error, add
@using Syncfusion.Blazor.Chartsto your Razor file or use the full type name.
Table of Contents
- Overview
- Basic Implementation
- Text Content
- Single Line Text
- Multi-Line Text
- Dynamic Content
- Hover Text Format
- Available Placeholders
- Advanced Hover Examples
- Interactive Example
- Font Customization
- Font Properties
- Typography Best Practices
- Advanced Typography Example
- Position Adjustment
- Offset Properties
- When to Use Offsets
- Offset Best Practices
- Complete Example: Dashboard KPI
- Best Practices
- Troubleshooting
Center Label Reference for Syncfusion Blazor Accumulation Charts
Overview
The center label feature displays custom text in the middle of pie and donut charts, transforming the hollow center into valuable real estate for displaying key metrics, titles, or dynamic information. This is particularly effective for donut charts where the center space would otherwise be empty, and for presenting aggregate statistics or contextual information.
Key capabilities:
- Display static titles, summaries, or branding
- Show dynamic text that changes on hover
- Customize font, color, and size
- Adjust position with X/Y offsets
- Support multi-line text with HTML breaks
- Integrate seamlessly with chart theme
When to use center labels:
- Donut charts (mandatory for effective use of center space)
- Displaying total values or aggregate statistics
- Chart titles or contextual headings
- Branding (company names, logos as text)
- Hover-driven dynamic information displays
- Key performance indicators (KPIs) in dashboards
When to avoid center labels:
- Pie charts (no center space available)
- When center space is needed for other UI elements
- Charts that will be exported as images (center label may obscure data)
- Very small donut charts (< 200px) where text won't fit
Basic Implementation
Add center label using AccumulationChartCenterLabel with the Text property:
<SfAccumulationChart Title="Browser Market Share">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries
DataSource="@BrowserData"
XName="Browser"
YName="Users"
InnerRadius="60%"> <!-- Donut chart -->
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<AccumulationChartCenterLabel Text="Browser<br>Statistics 2024">
</AccumulationChartCenterLabel>
<AccumulationChartLegendSettings Visible="false"/>
</SfAccumulationChart>
@code {
public class BrowserStats
{
public string Browser { get; set; }
public double Users { get; set; }
}
public List<BrowserStats> BrowserData = new List<BrowserStats>
{
new BrowserStats { Browser = "Chrome", Users = 63.5 },
new BrowserStats { Browser = "Safari", Users = 25.0 },
new BrowserStats { Browser = "Edge", Users = 6.0 },
new BrowserStats { Browser = "Firefox", Users = 3.0 },
new BrowserStats { Browser = "Others", Users = 2.5 }
};
}Key requirements:
- Series must have
InnerRadius> 0% (donut chart) - Recommended
InnerRadius: 40-70% for optimal space - Use
<br>tags for multi-line text
Default appearance:
- Text centered horizontally and vertically
- Font size: 14px
- Color: Theme text color
- Font weight: Normal
- No background or border
Text Content
The Text property accepts plain text or HTML break tags for line breaks.
Single Line Text
<AccumulationChartCenterLabel Text="Total Sales: $2.4M">
</AccumulationChartCenterLabel>Multi-Line Text
<AccumulationChartCenterLabel Text="Q4 2024<br>Revenue<br>$2.4M">
</AccumulationChartCenterLabel>Output:
Q4 2024
Revenue
$2.4MDynamic Content
Calculate and display dynamic text based on data:
<AccumulationChartCenterLabel Text="@CenterLabelText">
</AccumulationChartCenterLabel>
@code {
private string CenterLabelText => $"Total<br>{TotalSales:C0}";
private double TotalSales => SalesData?.Sum(s => s.Amount) ?? 0;
public List<SalesData> SalesData = new List<SalesData>
{
new SalesData { Category = "A", Amount = 125000 },
new SalesData { Category = "B", Amount = 98000 },
new SalesData { Category = "C", Amount = 87000 }
};
}Best practices for text content:
- Keep text concise (< 30 characters per line)
- Use 2-3 lines maximum for readability
- Center-align multi-line text visually
- Consider text length at various chart sizes
- Test with longest expected text
Hover Text Format
Display dynamic text when hovering over chart segments using HoverTextFormat:
<AccumulationChartCenterLabel
Text="Browser<br>Statistics"
HoverTextFormat="${point.x}<br>Users: ${point.y}%">
</AccumulationChartCenterLabel>Behavior:
- Default
Textshown when not hovering - On segment hover, center label changes to
HoverTextFormat - Returns to default
Textwhen hover ends - Smooth transition between states
Available Placeholders
<AccumulationChartCenterLabel
HoverTextFormat="${point.x}<br>${point.y}%<br>(${point.percentage}% share)">
</AccumulationChartCenterLabel>Placeholder reference:
| Placeholder | Description | Example |
|---|---|---|
| ${point.x} | Category/label value | "Chrome" |
| ${point.y} | Numeric value | 63.5 |
| ${point.percentage} | Percentage of total | 45.2 |
| ${point.text} | Point text property | "Top Browser" |
Advanced Hover Examples
KPI Dashboard:
<AccumulationChartCenterLabel
Text="Department<br>Expenses<br>2024"
HoverTextFormat="${point.x}<br><b>${point.y:C0}</b><br>${point.percentage:F1}% of total">
</AccumulationChartCenterLabel>Conditional formatting:
@code {
private string GetHoverFormat(double value)
{
if (value > 50)
return "${point.x}<br><b style='color: green;'>${point.y}%</b><br>High Usage";
else
return "${point.x}<br><b style='color: orange;'>${point.y}%</b><br>Moderate Usage";
}
}Note: HTML inline styles are supported in HoverTextFormat for rich formatting.
Interactive Example
<SfAccumulationChart Title="Sales by Region">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries
DataSource="@RegionSales"
XName="Region"
YName="Sales"
InnerRadius="65%">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<AccumulationChartCenterLabel
Text="2024 Sales<br><small>Hover for details</small>"
HoverTextFormat="${point.x}<br><b>$${point.y}K</b><br>Market Share: ${point.percentage}%">
<AccumulationChartCenterLabelFont Size="16px" FontWeight="600"/>
</AccumulationChartCenterLabel>
</SfAccumulationChart>
@code {
public List<RegionalSales> RegionSales = new List<RegionalSales>
{
new RegionalSales { Region = "North", Sales = 450 },
new RegionalSales { Region = "South", Sales = 380 },
new RegionalSales { Region = "East", Sales = 290 },
new RegionalSales { Region = "West", Sales = 520 }
};
}Hover interaction flow: 1. Chart displays with default text: "2024 Sales / Hover for details" 2. User hovers over "North" segment 3. Center label changes to: "North / $450K / Market Share: 27.1%" 4. User moves to "South" segment 5. Center label updates to: "South / $380K / Market Share: 22.9%" 6. User moves mouse away 7. Center label returns to: "2024 Sales / Hover for details"
Font Customization
Customize center label typography using AccumulationChartCenterLabelFont:
<AccumulationChartCenterLabel Text="Total Revenue<br>$2.4M">
<AccumulationChartCenterLabelFont
Size="18px"
FontWeight="700"
FontFamily="'Segoe UI', Arial, sans-serif"
FontStyle="Normal"
Color="#2563eb"/>
</AccumulationChartCenterLabel>Font Properties
| Property | Type | Description | Default | Example Values |
|---|---|---|---|---|
| Size | string | Font size with unit | "14px" | "16px", "1.2rem", "14pt" |
| FontWeight | string | Text weight | "Normal" | "Normal", "Bold", "600", "700" |
| FontFamily | string | Font stack | Theme font | "'Inter', sans-serif" |
| FontStyle | string | Style variant | "Normal" | "Normal", "Italic", "Oblique" |
| Color | string | Text color | Theme color | "#2563eb", "rgb(37, 99, 235)" |
Typography Best Practices
Size selection:
- Small charts (< 300px): 12-14px
- Medium charts (300-500px): 14-18px
- Large charts (> 500px): 18-24px
- Multi-line: Use consistent or decreasing sizes
<!-- Primary line larger, secondary smaller -->
<AccumulationChartCenterLabel>
<AccumulationChartCenterLabelFont Size="20px" FontWeight="700"/>
<!-- Add secondary line with smaller font via CSS -->
</AccumulationChartCenterLabel>Font weight:
- 400 (Normal): Body text, general information
- 600 (Semi-bold): Emphasis, key metrics
- 700 (Bold): Primary values, headings
- 800-900: Rare, for extreme emphasis
Color selection:
- High contrast for readability (WCAG AA minimum)
- Consider chart segment colors (avoid clashes)
- Use theme colors for consistency
- Test against different backgrounds
Accessible color combinations:
<!-- Light theme -->
<AccumulationChartCenterLabelFont Color="#1e293b" Size="16px"/>
<!-- Dark theme -->
<AccumulationChartCenterLabelFont Color="#f1f5f9" Size="16px"/>
<!-- Brand color with sufficient contrast -->
<AccumulationChartCenterLabelFont Color="#0369a1" Size="16px" FontWeight="600"/>Advanced Typography Example
<AccumulationChartCenterLabel Text="FY 2024<br><span style='font-size: 28px; font-weight: 800; color: #059669;'>$4.2M</span><br><span style='font-size: 14px; color: #6b7280;'>+18% YoY</span>">
<AccumulationChartCenterLabelFont
Size="16px"
FontWeight="600"
FontFamily="'Inter', system-ui, sans-serif"
Color="#111827"/>
</AccumulationChartCenterLabel>Note: While base font properties apply to the entire center label, you can use inline styles within the Text for varied formatting of different lines.
Position Adjustment
Fine-tune center label position using XOffset and YOffset properties:
<AccumulationChartCenterLabel
Text="Centered Text"
XOffset="10" <!-- Shift right 10 pixels -->
YOffset="-5"> <!-- Shift up 5 pixels -->
</AccumulationChartCenterLabel>Offset Properties
| Property | Type | Description | Default |
|---|---|---|---|
| XOffset | double | Horizontal shift (positive = right, negative = left) | 0 |
| YOffset | double | Vertical shift (positive = down, negative = up) | 0 |
When to Use Offsets
Visual alignment corrections:
<!-- Multi-line text appears slightly high, shift down -->
<AccumulationChartCenterLabel
Text="Line 1<br>Line 2<br>Line 3"
YOffset="5">
</AccumulationChartCenterLabel>Asymmetric chart designs:
<!-- Chart has legend on right, shift label left for balance -->
<AccumulationChartCenterLabel
Text="Sales Data"
XOffset="-15">
</AccumulationChartCenterLabel>Precise alignment with other elements:
<!-- Align with specific chart feature -->
<AccumulationChartCenterLabel
Text="Q4 Results"
XOffset="8"
YOffset="-3">
</AccumulationChartCenterLabel>Offset Best Practices
Do:
- Use small adjustments (± 5-15 pixels)
- Test at different chart sizes
- Consider responsive behavior
- Document reasons for non-zero offsets
Don't:
- Use large offsets (> 30 pixels) - indicates design issue
- Rely on offsets for initial positioning (use InnerRadius instead)
- Forget to test with different data/text lengths
- Use offsets to work around layout problems
Troubleshooting alignment: 1. Check if InnerRadius is appropriate for text size 2. Verify text isn't too long (causing overflow) 3. Test with different font sizes 4. Ensure chart container isn't constraining layout 5. Use browser dev tools to inspect actual position
Complete Example: Dashboard KPI
<SfAccumulationChart
Title="Department Budget Allocation"
Width="500px"
Height="500px"
Theme="Syncfusion.Blazor.Theme.Bootstrap5">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries
DataSource="@BudgetData"
XName="Department"
YName="Budget"
InnerRadius="65%"
ExplodeIndex="0"
ExplodeOffset="10%">
<AccumulationDataLabelSettings
Visible="true"
Position="Syncfusion.Blazor.Charts.AccumulationLabelPosition.Outside"
Name="Label">
<AccumulationChartConnector Type="Syncfusion.Blazor.Charts.ConnectorType.Curve" Length="20px"/>
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<AccumulationChartCenterLabel
Text="Total Budget<br><b style='font-size: 32px; color: #059669;'>$@TotalBudget.ToString("N0")</b><br><small style='color: #6b7280;'>FY 2024</small>"
HoverTextFormat="${point.x}<br><b style='font-size: 24px; color: #2563eb;'>$${point.y}K</b><br>${point.percentage}% of budget"
YOffset="-5">
<AccumulationChartCenterLabelFont
Size="18px"
FontWeight="600"
FontFamily="'Inter', sans-serif"
Color="#111827"/>
</AccumulationChartCenterLabel>
<AccumulationChartLegendSettings
Visible="true"
Position="Syncfusion.Blazor.Charts.LegendPosition.Bottom"/>
<AccumulationChartTooltipSettings Enable="true"/>
</SfAccumulationChart>
@code {
public class BudgetAllocation
{
public string Department { get; set; }
public double Budget { get; set; }
public string Label { get; set; }
}
public List<BudgetAllocation> BudgetData = new List<BudgetAllocation>
{
new BudgetAllocation { Department = "Engineering", Budget = 450, Label = "Engineering: $450K" },
new BudgetAllocation { Department = "Sales", Budget = 380, Label = "Sales: $380K" },
new BudgetAllocation { Department = "Marketing", Budget = 290, Label = "Marketing: $290K" },
new BudgetAllocation { Department = "Operations", Budget = 180, Label = "Operations: $180K" },
new BudgetAllocation { Department = "Support", Budget = 120, Label = "Support: $120K" }
};
private double TotalBudget => BudgetData.Sum(b => b.Budget);
}Features demonstrated:
- Dynamic total calculation in center
- Hover text with formatted values
- Multi-line text with varied styling
- Professional typography
- Integrated with legend and tooltips
- Responsive design considerations
Best Practices
Content:
- Keep text concise (3 lines maximum)
- Use line breaks strategically for hierarchy
- Show aggregate or contextual information
- Update dynamically based on data changes
- Consider text length at minimum chart size
Design:
- Ensure sufficient contrast (WCAG AA: 4.5:1 minimum)
- Use font sizes appropriate for chart size
- Match typography to application design system
- Test with actual data (not just placeholder text)
- Consider internationalization (text length varies)
Interactivity:
- Use hover text for detailed information
- Provide clear indication that hover changes text
- Ensure hover text is meaningful, not redundant
- Test hover behavior on touch devices
- Don't rely solely on hover for critical info
Performance:
- Avoid frequent text updates (debounce if dynamic)
- Use simple HTML formatting (complex DOM is slower)
- Pre-calculate derived values in data preparation
- Test with large datasets
Troubleshooting
Text not visible:
- Verify
InnerRadius> 40% (sufficient center space) - Check text color contrasts with background
- Ensure font size isn't too small or too large
- Verify chart dimensions accommodate text
Text truncated:
- Reduce text length or font size
- Increase chart size or
InnerRadius - Break long lines with
<br>tags - Use abbreviations for long words
Text position incorrect:
- Check if parent container constrains chart
- Verify XOffset/YOffset values are reasonable
- Test with different chart sizes
- Ensure chart has rendered before adjusting
Hover text not updating:
- Verify
HoverTextFormatproperty is set - Check data binding is correct
- Ensure chart has interactive mode enabled
- Test mouse events aren't blocked
Alignment issues:
- Use small YOffset adjustments (± 5-10px)
- Check if multi-line text needs centering adjustment
- Verify font-size units are consistent
- Test across different browsers
---
Quick reference:
<AccumulationChartCenterLabel
Text="Default Text<br>Line 2"
HoverTextFormat="${point.x}<br>${point.y}"
XOffset="0"
YOffset="0">
<AccumulationChartCenterLabelFont
Size="16px"
FontWeight="600"
FontFamily="'Inter', sans-serif"
FontStyle="Normal"
Color="#111827"/>
</AccumulationChartCenterLabel>Accumulation Chart Types
Table of Contents
- Overview
- Pie Chart
- When to Use Pie Charts
- Basic Pie Chart
- Customizing Pie Chart Radius
- Customizing Pie Center Position
- Various Radius Per Slice
- Start and End Angles
- Color and Text Mapping
- Border Radius
- Hide Border on Hover
- Doughnut Chart
- When to Use Doughnut Charts
- Basic Doughnut Chart
- InnerRadius Property
- Doughnut with Center Label
- Combining with Data Labels
- Funnel Chart
- When to Use Funnel Charts
- Basic Funnel Chart
- Funnel Size Customization
- Neck Dimensions
- Gap Between Segments
- Explode Funnel Segments
- Smart Data Labels for Funnels
- Pyramid Chart
- When to Use Pyramid Charts
- Basic Pyramid Chart
- Pyramid Mode: Linear vs Surface
- Pyramid Size
- Gap Between Pyramid Segments
- Pyramid Explode
- Choosing the Right Chart Type
- Decision Matrix
- When NOT to Use Accumulation Charts
- Type Property Values
- Combining Features Across Types
Overview
Syncfusion Blazor Accumulation Charts support four distinct chart types, each designed for specific data visualization needs:
| Chart Type | Best For | Key Features |
|---|---|---|
| Pie | Proportional data, market share | Full circle, simple distribution |
| Doughnut | Multiple series, center content | Inner radius, center label support |
| Funnel | Stage-based processes, conversions | Narrowing segments, neck customization |
| Pyramid | Hierarchical data, rankings | Triangle shape, linear or surface mode |
The chart type is specified using the Type property on AccumulationChartSeries.
---
Pie Chart
The default and most common accumulation chart type. Displays data as slices of a circular "pie" where each slice represents a proportion of the whole.
When to Use Pie Charts
- Proportional data visualization - Show parts of a whole
- Market share distribution - Compare competitor shares
- Survey results - Display response percentages
- Budget breakdowns - Visualize spending categories
- Sales by product - Compare product performance
Avoid when: You have many categories (>7) or need precise value comparisons.
Basic Pie Chart
@using Syncfusion.Blazor.Charts
<SfAccumulationChart Title="Market Share Analysis">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@MarketData"
XName="Company"
YName="Share">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<AccumulationChartLegendSettings Visible="true">
</AccumulationChartLegendSettings>
</SfAccumulationChart>
@code {
public class MarketShareData
{
public string Company { get; set; }
public double Share { get; set; }
}
public List<MarketShareData> MarketData = new List<MarketShareData>
{
new MarketShareData { Company = "Chrome", Share = 37 },
new MarketShareData { Company = "Firefox", Share = 19 },
new MarketShareData { Company = "Safari", Share = 17 },
new MarketShareData { Company = "Edge", Share = 12 },
new MarketShareData { Company = "Opera", Share = 11 },
new MarketShareData { Company = "Others", Share = 4 }
};
}Customizing Pie Chart Radius
Control the size of the pie using the Radius property (default: 80%):
<AccumulationChartSeries DataSource="@Data"
XName="Category"
YName="Value"
Radius="100%">
</AccumulationChartSeries>- "80%" - Default, leaves margin around chart
- "100%" - Full size, fills available space
- "60%" - Smaller pie, more surrounding space
Customizing Pie Center Position
Move the pie center using AccumulationChartCenter:
<SfAccumulationChart Title="Off-Center Pie">
<AccumulationChartCenter X="70%" Y="60%" />
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@Data" XName="X" YName="Y">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>Use cases:
- Creating asymmetric layouts
- Positioning for specific design requirements
- Aligning with other page elements
Various Radius Per Slice
Give each slice a different radius by mapping to a data property:
<AccumulationChartSeries DataSource="@Data"
XName="Region"
YName="Revenue"
InnerRadius="20%"
Radius="RadiusValue">
</AccumulationChartSeries>
@code {
public class RevenueData
{
public string Region { get; set; }
public double Revenue { get; set; }
public string RadiusValue { get; set; } // "100", "118.7", "124.6", etc.
}
public List<RevenueData> Data = new List<RevenueData>
{
new RevenueData { Region = "North", Revenue = 505, RadiusValue = "100" },
new RevenueData { Region = "South", Revenue = 551, RadiusValue = "118.7" },
new RevenueData { Region = "East", Revenue = 312, RadiusValue = "124.6" }
};
}Creates dramatic visual hierarchy - larger slices for higher values.
Start and End Angles
Create semi-pie or custom arc charts:
<AccumulationChartSeries DataSource="@Data"
XName="Category"
YName="Value"
StartAngle="270"
EndAngle="90">
</AccumulationChartSeries>Common configurations:
- 0° to 360° - Full circle (default)
- 270° to 90° - Semi-circle (bottom half)
- 0° to 180° - Semi-circle (right half)
- 180° to 360° - Semi-circle (left half)
Color and Text Mapping
Map colors and label text from your data source:
<AccumulationChartSeries DataSource="@Data"
XName="Product"
YName="Sales"
PointColorMapping="Color">
<AccumulationDataLabelSettings Visible="true"
Name="LabelText">
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
@code {
public class SalesData
{
public string Product { get; set; }
public double Sales { get; set; }
public string Color { get; set; } // "#498fff", "#ffa060", etc.
public string LabelText { get; set; } // "37%", "Product A", etc.
}
public List<SalesData> Data = new List<SalesData>
{
new SalesData { Product = "A", Sales = 37, Color = "#498fff", LabelText = "37%" },
new SalesData { Product = "B", Sales = 28, Color = "#ffa060", LabelText = "28%" }
};
}Border Radius
Round the corners of pie slices:
<AccumulationChartSeries DataSource="@Data"
XName="Item"
YName="Amount"
BorderRadius="8">
</AccumulationChartSeries>Creates modern, polished appearance with rounded edges.
Hide Border on Hover
Disable the highlight border that appears on mouse hover:
<SfAccumulationChart EnableBorderOnMouseMove="false">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@Data" XName="X" YName="Y">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>---
Doughnut Chart
A pie chart with a hollow center, created by setting InnerRadius. Perfect for displaying center content or multiple concentric series.
When to Use Doughnut Charts
- Center content display - Show total or summary in center
- Multiple data series - Compare two concentric rings
- Modern design aesthetic - More contemporary than traditional pie
- Focus on segment lengths - Easier to compare than pie slices
Basic Doughnut Chart
<SfAccumulationChart Title="Revenue Distribution">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@RevenueData"
XName="Region"
YName="Revenue"
InnerRadius="40%">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
@code {
public List<RegionRevenue> RevenueData = new List<RegionRevenue>
{
new RegionRevenue { Region = "North America", Revenue = 125.5 },
new RegionRevenue { Region = "Europe", Revenue = 98.2 },
new RegionRevenue { Region = "Asia", Revenue = 76.8 },
new RegionRevenue { Region = "Latin America", Revenue = 54.3 }
};
}InnerRadius Property
Controls the size of the hollow center:
- "0%" - Full pie (no hollow)
- "40%" - Balanced doughnut (recommended)
- "60%" - Thin ring
- "80%" - Very thin ring (almost circular line)
<AccumulationChartSeries InnerRadius="60%">Doughnut with Center Label
Display text or values in the hollow center:
<AccumulationChartSeries DataSource="@Data"
XName="Category"
YName="Value"
InnerRadius="40%">
<AccumulationChartCenterLabel
Text="Total<br/>$1.2M">
<AccumulationChartCenterLabelFont
Size="18px"
FontWeight="600"
Color="#333">
</AccumulationChartCenterLabelFont>
</AccumulationChartCenterLabel>
</AccumulationChartSeries>Best practices:
- Keep text concise (1-3 lines)
- Use
<br/>for line breaks - Style appropriately for visibility
- Update dynamically with events
For more center label customization, see center-label.md.
Combining with Data Labels
Doughnuts work well with outside labels and connectors:
<AccumulationChartSeries DataSource="@Data"
XName="Product"
YName="Sales"
InnerRadius="40%">
<AccumulationDataLabelSettings Visible="true"
Position="Syncfusion.Blazor.Charts.AccumulationLabelPosition.Outside">
<AccumulationChartConnector Length="20px">
</AccumulationChartConnector>
</AccumulationDataLabelSettings>
<AccumulationChartCenterLabel Text="Total<br/>Sales">
</AccumulationChartCenterLabel>
</AccumulationChartSeries>---
Funnel Chart
Visualizes data as progressively narrowing stages, ideal for conversion processes and stage-based workflows.
When to Use Funnel Charts
- Sales pipelines - Lead → Prospect → Customer stages
- Conversion funnels - Website visitor → Sign-up → Purchase
- Recruitment process - Applied → Screened → Interviewed → Hired
- Manufacturing stages - Raw material → Processing → Final product
- Any sequential process with decreasing quantities
Basic Funnel Chart
<SfAccumulationChart Title="Sales Conversion Funnel">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@FunnelData"
XName="Stage"
YName="Count"
Type="Syncfusion.Blazor.Charts.AccumulationType.Funnel">
<AccumulationDataLabelSettings Visible="true" Name="Stage">
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
@code {
public class FunnelStageData
{
public string Stage { get; set; }
public double Count { get; set; }
}
public List<FunnelStageData> FunnelData = new List<FunnelStageData>
{
new FunnelStageData { Stage = "Website Visitors", Count = 10000 },
new FunnelStageData { Stage = "Product Views", Count = 5500 },
new FunnelStageData { Stage = "Add to Cart", Count = 2800 },
new FunnelStageData { Stage = "Checkout Started", Count = 1200 },
new FunnelStageData { Stage = "Purchase Complete", Count = 850 }
};
}Funnel Size Customization
Control overall funnel dimensions:
<AccumulationChartSeries Type="Syncfusion.Blazor.Charts.AccumulationType.Funnel"
Width="60%"
Height="80%">
</AccumulationChartSeries>- Width: Horizontal extent (default: 80%)
- Height: Vertical extent (default: 80%)
Neck Dimensions
The "neck" is the narrow bottom portion of the funnel. Customize with NeckWidth and NeckHeight:
<AccumulationChartSeries Type="Syncfusion.Blazor.Charts.AccumulationType.Funnel"
NeckWidth="15%"
NeckHeight="18%">
</AccumulationChartSeries>- NeckWidth: Width of bottom section (% of chart width)
- NeckHeight: Height of neck section (% of funnel height)
- Larger neck = more gradual taper
- Smaller neck = dramatic narrowing effect
Visual examples:
NeckWidth="25%", NeckHeight="25%"- Gentle taperNeckWidth="10%", NeckHeight="10%"- Sharp narrowing (classic funnel)NeckWidth="0%", NeckHeight="0%"- Perfect triangle (no neck)
Gap Between Segments
Add spacing between funnel segments:
<AccumulationChartSeries Type="Syncfusion.Blazor.Charts.AccumulationType.Funnel"
GapRatio="0.2">
</AccumulationChartSeries>- 0 - No gaps (segments touch)
- 0.1 - Small gaps
- 0.2 - Medium gaps (recommended)
- 0.3+ - Large gaps (segments appear disconnected)
Explode Funnel Segments
Separate segments from the funnel:
<AccumulationChartSeries Type="Syncfusion.Blazor.Charts.AccumulationType.Funnel"
Explode="true"
ExplodeIndex="2"
ExplodeOffset="10%">
</AccumulationChartSeries>- Explode: Enable click-to-explode behavior
- ExplodeIndex: Segment to explode on load (0-based)
- ExplodeOffset: Distance of explosion
Smart Data Labels for Funnels
With many segments, labels can overlap. Enable smart positioning:
<SfAccumulationChart EnableAnimation="false">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries Type="Syncfusion.Blazor.Charts.AccumulationType.Funnel"
Width="50%" Height="80%"
NeckWidth="15%" NeckHeight="18%">
<AccumulationDataLabelSettings Visible="true"
Name="Country"
Position="Syncfusion.Blazor.Charts.AccumulationLabelPosition.Outside">
<AccumulationChartConnector Length="6%">
</AccumulationChartConnector>
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>Labels automatically reposition to avoid collisions.
---
Pyramid Chart
Displays hierarchical data in an upside-down triangle with horizontal segments. Shows ranking or hierarchical structure.
When to Use Pyramid Charts
- Organizational hierarchy - Management levels
- Food pyramid - Dietary recommendations
- Age distribution - Population demographics (inverted)
- Priority ranking - High to low importance
- Resource allocation - Distribution by category
Basic Pyramid Chart
<SfAccumulationChart Title="Organizational Hierarchy">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@HierarchyData"
XName="Level"
YName="Count"
Type="Syncfusion.Blazor.Charts.AccumulationType.Pyramid">
<AccumulationDataLabelSettings Visible="true" Name="Level">
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
@code {
public class HierarchyLevel
{
public string Level { get; set; }
public double Count { get; set; }
}
public List<HierarchyLevel> HierarchyData = new List<HierarchyLevel>
{
new HierarchyLevel { Level = "C-Level", Count = 5 },
new HierarchyLevel { Level = "Directors", Count = 15 },
new HierarchyLevel { Level = "Managers", Count = 45 },
new HierarchyLevel { Level = "Team Leads", Count = 120 },
new HierarchyLevel { Level = "Staff", Count = 500 }
};
}Pyramid Mode: Linear vs Surface
Two rendering modes affect how segment heights are calculated:
<AccumulationChartSeries Type="Syncfusion.Blazor.Charts.AccumulationType.Pyramid"
PyramidMode="Syncfusion.Blazor.Charts.PyramidMode.Linear">
</AccumulationChartSeries>Linear Mode (default):
- Segment height proportional to value
- Equal visual spacing
- Better for data comparison
Surface Mode:
- Segment area proportional to value
- Variable heights for visual balance
- More aesthetically pleasing
<AccumulationChartSeries Type="Syncfusion.Blazor.Charts.AccumulationType.Pyramid"
PyramidMode="Syncfusion.Blazor.Charts.PyramidMode.Surface">
</AccumulationChartSeries>Pyramid Size
Control dimensions just like funnels:
<AccumulationChartSeries Type="Syncfusion.Blazor.Charts.AccumulationType.Pyramid"
Width="60%"
Height="80%">
</AccumulationChartSeries>Gap Between Pyramid Segments
<AccumulationChartSeries Type="Syncfusion.Blazor.Charts.AccumulationType.Pyramid"
GapRatio="0.2">
</AccumulationChartSeries>Same behavior as funnel gaps - creates separation between horizontal segments.
Pyramid Explode
<AccumulationChartSeries Type="Syncfusion.Blazor.Charts.AccumulationType.Pyramid"
Explode="true"
ExplodeIndex="2"
ExplodeOffset="10">
</AccumulationChartSeries>Separates a segment horizontally from the pyramid.
---
Choosing the Right Chart Type
Decision Matrix
| Requirement | Recommended Chart |
|---|---|
| Show proportions of a whole | Pie |
| Display center content | Doughnut |
| Visualize stage-based process | Funnel |
| Show hierarchical ranking | Pyramid |
| Multiple data series | Doughnut (concentric) |
| Emphasize flow/conversion | Funnel |
| Need modern aesthetic | Doughnut |
| Traditional data distribution | Pie |
When NOT to Use Accumulation Charts
- Many categories (>8): Consider bar/column charts
- Precise value comparison: Use bar or column charts
- Time series data: Use line or area charts
- Negative values: Accumulation charts require positive values
- Multiple series comparison: Use grouped bar/column charts
Type Property Values
Type="Syncfusion.Blazor.Charts.AccumulationType.Pie" // Default if not specified
Type="Syncfusion.Blazor.Charts.AccumulationType.Funnel"
Type="Syncfusion.Blazor.Charts.AccumulationType.Pyramid"
// Doughnut is Pie with InnerRadius > 0Combining Features Across Types
Many features work across all types:
✅ Works for all types:
- Data labels
- Legends
- Tooltips
- Selection and explosion
- Animations
- Events
❌ Type-specific:
InnerRadius- Pie/Doughnut onlyNeckWidth/NeckHeight- Funnel onlyPyramidMode- Pyramid onlyStartAngle/EndAngle- Pie/Doughnut only
Customization and Styling
Table of Contents
- Gradients
- Linear Gradients
- Radial Gradients
- Per-Point Gradients
- Grouping Small Slices
- Basic Grouping by Value
- Grouping by Point Count
- Grouping Modes
- Broken Slice (Interactive Grouping)
- Annotations
- Basic Annotation
- Coordinate Units
- Positioning Regions
- Annotation Examples
- Empty Points
- Empty Point Modes
- Custom Empty Point Styling
- Themes and Colors
- Built-in Themes
- Custom Color Palettes
- Per-Point Colors
- Borders and Radius
- Slice Borders
- Border Radius
- Hide Hover Border
- Responsive and Adaptive Layout
- Responsive Sizing
- Adaptive Layout
- Mobile Optimization
- Best Practices
- Performance
- Design
- Accessibility
- Usability
Gradients
Apply smooth color transitions to slices for modern, professional appearance.
Linear Gradients
Blend colors along a straight line:
<AccumulationChartSeries DataSource="@Data" XName="Category" YName="Value">
<AccumulationChartLinearGradient X1="0.1" Y1="0.0" X2="0.9" Y2="1.0">
<AccumulationChartGradientColorStops>
<AccumulationChartGradientColorStop Offset="0" Color="#4F46E5" Opacity="1" Brighten="0.55" />
<AccumulationChartGradientColorStop Offset="60" Color="#4F46E5" Opacity="0.98" Brighten="0.15" />
<AccumulationChartGradientColorStop Offset="100" Color="#4F46E5" Opacity="0.95" Brighten="-0.25" />
</AccumulationChartGradientColorStops>
</AccumulationChartLinearGradient>
</AccumulationChartSeries>Properties:
- X1, Y1: Start point (0-1 coordinates)
- X2, Y2: End point (0-1 coordinates)
- Offset: Position along gradient (0-100)
- Brighten: Adjust brightness (-1 to 1)
- Lighten: Adjust lightness
- Opacity: Transparency (0-1)
Radial Gradients
Create circular color transitions from center outward:
<AccumulationChartRadialGradient CX="0.5" CY="0.5" R="1" FX="0.5" FY="0.5">
<AccumulationChartGradientColorStops>
<AccumulationChartGradientColorStop Offset="0" Color="#FFFFFF" Opacity="1" />
<AccumulationChartGradientColorStop Offset="100" Color="#4F46E5" Opacity="1" />
</AccumulationChartGradientColorStops>
</AccumulationChartRadialGradient>When to use:
- Pie/doughnut charts for 3D effect
- Emphasize center content
- Modern, polished design
Per-Point Gradients
Apply different gradients to individual slices using OnPointRender event:
<SfAccumulationChart>
<AccumulationChartEvents OnPointRender="PointRender"></AccumulationChartEvents>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@Data" XName="X" YName="Y">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
@code {
private void PointRender(AccumulationPointRenderEventArgs args)
{
var gradient = new AccumulationChartLinearGradient
{
X1 = "0.0", Y1 = "0.0", X2 = "1.0", Y2 = "1.0"
};
gradient.ColorStops = new List<AccumulationChartGradientColorStop>
{
new AccumulationChartGradientColorStop { Offset = 0, Color = GetColor(args.Point.Index), Opacity = 1 },
new AccumulationChartGradientColorStop { Offset = 100, Color = GetColor(args.Point.Index), Opacity = 0.7, Brighten = -0.3 }
};
args.Fill = gradient;
}
private string GetColor(int index)
{
string[] colors = { "#4F46E5", "#06B6D4", "#10B981", "#F59E0B", "#EF4444" };
return colors[index % colors.Length];
}
}Grouping Small Slices
Combine small data points into an "Others" category for cleaner visualization.
Basic Grouping by Value
<AccumulationChartSeries DataSource="@Data"
XName="Category"
YName="Value"
GroupTo="10">
</AccumulationChartSeries>Points with values < 10 are grouped together.
Grouping by Point Count
<AccumulationChartSeries GroupTo="3"
GroupMode="Syncfusion.Blazor.Charts.GroupMode.Point">
</AccumulationChartSeries>Smallest 3 points are grouped.
Grouping Modes
Syncfusion.Blazor.Charts.GroupMode.Value (default):
- Groups by numeric threshold
- Example:
GroupTo="10"groups all values < 10
Syncfusion.Blazor.Charts.GroupMode.Point:
- Groups by point count
- Example:
GroupTo="3"groups 3 smallest points
Broken Slice (Interactive Grouping)
Enable Explode to let users click "Others" to see grouped items:
<AccumulationChartSeries GroupTo="10"
Explode="true"
ExplodeOffset="10">
</AccumulationChartSeries>Best practices:
- Use for 8+ data points
- Set threshold to group <5% values
- Maintain data integrity (show full data in tooltip)
Annotations
Add text, shapes, or images to highlight specific regions.
Basic Annotation
<SfAccumulationChart>
<AccumulationChartAnnotations>
<AccumulationChartAnnotation X="50%" Y="50%"
CoordinateUnits="Units.Percentage"
Region="Regions.Chart">
<ContentTemplate>
<div style="background:#f0f0f0; padding:10px; border-radius:5px;">
<b>Total Sales</b><br/>
$1.2M
</div>
</ContentTemplate>
</AccumulationChartAnnotation>
</AccumulationChartAnnotations>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@Data" XName="X" YName="Y">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>Coordinate Units
Units.Percentage:
- X, Y as percentages ("50%", "75%")
- Relative to chart/series area
Units.Pixel:
- Absolute pixel coordinates
- X=100, Y=150
Units.Point:
- Position relative to data point
- X="ProductA", Y=value
Positioning Regions
Regions.Chart:
- Relative to entire chart area
- For titles, watermarks, legends
Regions.Series:
- Relative to plot area
- For data-specific annotations
Annotation Examples
Highlight a slice:
<AccumulationChartAnnotation X="Chrome" Y="37"
CoordinateUnits="Units.Point"
Region="Regions.Series">
<ContentTemplate>
<div style="color:red; font-weight:bold;">★ Best Performer</div>
</ContentTemplate>
</AccumulationChartAnnotation>Watermark:
<AccumulationChartAnnotation X="50%" Y="50%"
CoordinateUnits="Units.Percentage">
<ContentTemplate>
<div style="opacity:0.1; font-size:48px; transform:rotate(-45deg);">
CONFIDENTIAL
</div>
</ContentTemplate>
</AccumulationChartAnnotation>Empty Points
Handle null, undefined, or zero values in data.
Empty Point Modes
<AccumulationChartSeries DataSource="@Data" XName="Month" YName="Sales">
<AccumulationChartEmptyPointSettings Mode="Syncfusion.Blazor.Charts.EmptyPointMode.Drop">
</AccumulationChartEmptyPointSettings>
</AccumulationChartSeries>Modes:
- Drop: Skip empty points (don't render)
- Zero: Treat as zero value
- Average: Use average of adjacent values
- Gap: Leave visual gap (funnel/pyramid)
Custom Empty Point Styling
<AccumulationChartEmptyPointSettings Mode="Syncfusion.Blazor.Charts.EmptyPointMode.Average"
Fill="#cccccc"
Border="new { Width = 2, Color = '#ff0000' }">
</AccumulationChartEmptyPointSettings>When to use each mode:
- Drop: Data truly missing, shouldn't affect totals
- Zero: Missing data means no value
- Average: Estimate missing data
- Gap: Show data discontinuity
Themes and Colors
Built-in Themes
Apply via chart Theme property:
<SfAccumulationChart Theme="Syncfusion.Blazor.Theme.Bootstrap5">
</SfAccumulationChart>Available themes:
- Bootstrap5, Bootstrap5Dark
- Material, Material3, MaterialDark, Material3Dark
- Fabric, FabricDark
- Fluent, Fluent2, FluentDark, Fluent2Dark
- Tailwind, TailwindDark, Tailwind3, Tailwind3Dark
- HighContrast, HighContrastLight
Custom Color Palettes
Define custom colors for the series:
<AccumulationChartSeries DataSource="@Data" XName="X" YName="Y"
Palettes="@CustomPalette">
</AccumulationChartSeries>
@code {
private string[] CustomPalette = new string[]
{
"#4F46E5", "#06B6D4", "#10B981", "#F59E0B", "#EF4444",
"#8B5CF6", "#EC4899", "#F97316"
};
}Per-Point Colors
Use PointColorMapping to assign colors from data:
<AccumulationChartSeries DataSource="@Data"
XName="Category"
YName="Value"
PointColorMapping="Color">
</AccumulationChartSeries>
@code {
public class DataPoint
{
public string Category { get; set; }
public double Value { get; set; }
public string Color { get; set; } // "#4F46E5", "#06B6D4", etc.
}
}Borders and Radius
Slice Borders
<AccumulationChartSeries DataSource="@Data" XName="X" YName="Y">
<AccumulationChartSeriesBorder Width="2" Color="#FFFFFF">
</AccumulationChartSeriesBorder>
</AccumulationChartSeries>Common patterns:
- White borders for slice separation
- Thin borders (1-2px) for clean look
- Transparent for seamless appearance
Border Radius
Round slice corners:
<AccumulationChartSeries BorderRadius="8">
</AccumulationChartSeries>- Values: 0 (sharp) to 15 (very rounded)
- Best with: Modern designs, doughnut charts
- Affects: First and last slices (pie), all segments (funnel/pyramid)
Hide Hover Border
<SfAccumulationChart EnableBorderOnMouseMove="false">
</SfAccumulationChart>Disables the highlight border on mouse hover.
Responsive and Adaptive Layout
Responsive Sizing
Use percentage-based dimensions:
<SfAccumulationChart Width="100%" Height="450px">
</SfAccumulationChart>Adaptive Layout
Automatically adjusts for mobile devices:
<SfAccumulationChart EnableAdaptiveUI="true">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@Data" XName="X" YName="Y">
<AccumulationDataLabelSettings Visible="true" Position="Syncfusion.Blazor.Charts.AccumulationLabelPosition.Outside">
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>Adaptive features:
- Larger touch targets for mobile
- Adjusted label positioning
- Optimized legend placement
- Simplified data labels
Mobile Optimization
@if (IsMobile)
{
<SfAccumulationChart Height="350px">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries InnerRadius="30%">
<AccumulationDataLabelSettings Visible="false">
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<AccumulationChartLegendSettings Visible="true" Position="Syncfusion.Blazor.Charts.LegendPosition.Bottom">
</AccumulationChartLegendSettings>
</SfAccumulationChart>
}
else
{
<SfAccumulationChart Height="500px">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries InnerRadius="40%">
<AccumulationDataLabelSettings Visible="true" Position="Syncfusion.Blazor.Charts.AccumulationLabelPosition.Outside">
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
}
@code {
private bool IsMobile => /* detect mobile */;
}Best Practices
Performance
- Limit data points (≤20 for optimal rendering)
- Use grouping for many small slices
- Avoid complex gradients on 15+ slices
- Minimize annotation count
Design
- Maintain consistent color schemes across charts
- Use white/transparent borders for clean separation
- Apply gradients sparingly for emphasis
- Keep annotations minimal and relevant
Accessibility
- Ensure sufficient color contrast
- Don't rely solely on color (use labels)
- Test with HighContrast theme
- Provide text alternatives
Usability
- Group slices <3% of total
- Use tooltips for detailed data
- Enable legend for category identification
- Test on target devices (mobile/desktop)
Table of Contents
- Prerequisites
- Installation Steps
- Option 1: Using Visual Studio
- Option 2: Using Visual Studio Code
- Option 3: Using .NET CLI
- Configuration Steps
- Step 1: Import Namespaces
- Step 2: Register Syncfusion Services
- Step 3: Add Stylesheet and Scripts
- Create Your First Accumulation Chart
- Basic Pie Chart Example
- Run the Application
- Adding Essential Features
- Add Chart Title
- Enable Data Labels
- Enable Tooltips
- Enable Legend
- Understanding Data Binding
- Key Properties
- Data Model Requirements
- Different Data Types
- Complete Working Example
- Troubleshooting Common Issues
- Chart Not Rendering
- Data Not Displaying
- Theme Not Applied
- Namespace Errors
- Next Steps
- See Also
Getting Started with Blazor Accumulation Charts
This guide covers the complete setup and basic implementation of Syncfusion Blazor Accumulation Chart components in Blazor applications using Visual Studio, Visual Studio Code, or .NET CLI.
Prerequisites
Before starting, ensure you have:
- .NET SDK (latest version recommended)
- Visual Studio 2022, VS Code, or .NET CLI
- System requirements for Blazor components
- Basic knowledge of Blazor and C#
Installation Steps
Option 1: Using Visual Studio
Step 1: Create Blazor Project
1. Open Visual Studio 2022 2. Create a new project → Blazor WebAssembly App or Blazor Server App 3. Choose .NET 6.0 or later 4. Name your project and select location 5. Click Create
You can also use the Syncfusion Blazor Extension for project templates.
Step 2: Install NuGet Packages
Method A: NuGet Package Manager UI 1. Right-click project → Manage NuGet Packages 2. Search for Syncfusion.Blazor.Charts 3. Install the latest version 4. Repeat for Syncfusion.Blazor.Themes
Method B: Package Manager Console
Install-Package Syncfusion.Blazor.Charts
Install-Package Syncfusion.Blazor.Themes---
Option 2: Using Visual Studio Code
Step 1: Create Blazor Project
Open terminal (Ctrl+`) and run:
dotnet new blazorwasm -o MyAccumulationChartApp
cd MyAccumulationChartAppFor Blazor Server:
dotnet new blazorserver -o MyAccumulationChartApp
cd MyAccumulationChartAppStep 2: Install NuGet Packages
In the integrated terminal:
dotnet add package Syncfusion.Blazor.Charts
dotnet add package Syncfusion.Blazor.Themes
dotnet restore---
Option 3: Using .NET CLI
Step 1: Verify .NET Installation
dotnet --versionStep 2: Create and Configure Project
# Create project
dotnet new blazorwasm -o MyAccumulationChartApp
cd MyAccumulationChartApp
# Install packages
dotnet add package Syncfusion.Blazor.Charts
dotnet add package Syncfusion.Blazor.Themes
dotnet restoreConfiguration Steps
Step 1: Import Namespaces
Open _Imports.razor and add:
@using Syncfusion.Blazor
@using Syncfusion.Blazor.ChartsThis makes Syncfusion components available throughout your application.
---
Step 2: Register Syncfusion Services
For Blazor WebAssembly (Program.cs):
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Syncfusion.Blazor;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");
builder.Services.AddScoped(sp =>
new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
// Register Syncfusion services
builder.Services.AddSyncfusionBlazor();
await builder.Build().RunAsync();For Blazor Server (Program.cs):
using Syncfusion.Blazor;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
// Register Syncfusion services
builder.Services.AddSyncfusionBlazor();
var app = builder.Build();
// ... rest of configuration---
Step 3: Add Stylesheet and Scripts
For Blazor WebAssembly - Add to wwwroot/index.html inside <head>:
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>My Accumulation Chart App</title>
<base href="/" />
<!-- Syncfusion theme stylesheet -->
<link href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" rel="stylesheet" />
<!-- Syncfusion Blazor script -->
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js"
type="text/javascript"></script>
</head>For Blazor Server - Add to Pages/_Layout.cshtml or Pages/_Host.cshtml inside <head>.
Available Themes:
bootstrap5.css- Bootstrap 5 (recommended)material.css- Material Designfluent.css- Microsoft Fluent UItailwind.css- Tailwind CSSfabric.css- Office Fabricbootstrap5-dark.css- Bootstrap 5 Dark Modematerial-dark.css- Material Dark Mode
Alternative: CDN Reference
<link href="https://cdn.syncfusion.com/blazor/23.1.36/styles/bootstrap5.css" rel="stylesheet" />
<script src="https://cdn.syncfusion.com/blazor/23.1.36/syncfusion-blazor.min.js"></script>Create Your First Accumulation Chart
Basic Pie Chart Example
Create or open Pages/Index.razor:
@page "/"
@using Syncfusion.Blazor.Charts
<h3>Sales Distribution</h3>
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@SalesData"
XName="Product"
YName="Sales">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
@code {
public class ProductSales
{
public string Product { get; set; }
public double Sales { get; set; }
}
public List<ProductSales> SalesData = new List<ProductSales>
{
new ProductSales { Product = "Product A", Sales = 35 },
new ProductSales { Product = "Product B", Sales = 28 },
new ProductSales { Product = "Product C", Sales = 22 },
new ProductSales { Product = "Product D", Sales = 15 }
};
}Run the Application
Visual Studio: Press Ctrl+F5 or F5
VS Code or CLI:
dotnet runThen open browser to https://localhost:5001 (or the displayed URL).
Adding Essential Features
Add Chart Title
<SfAccumulationChart Title="Sales Distribution by Product">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@SalesData"
XName="Product"
YName="Sales">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>Enable Data Labels
<SfAccumulationChart Title="Sales Distribution by Product">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@SalesData"
XName="Product"
YName="Sales">
<!-- Enable data labels -->
<AccumulationDataLabelSettings Visible="true"
Name="Product">
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>Enable Tooltips
<SfAccumulationChart Title="Sales Distribution by Product">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@SalesData"
XName="Product"
YName="Sales">
<AccumulationDataLabelSettings Visible="true">
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<!-- Enable tooltip -->
<AccumulationChartTooltipSettings Enable="true">
</AccumulationChartTooltipSettings>
</SfAccumulationChart>Enable Legend
<SfAccumulationChart Title="Sales Distribution by Product">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@SalesData"
XName="Product"
YName="Sales">
<AccumulationDataLabelSettings Visible="true">
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<AccumulationChartTooltipSettings Enable="true">
</AccumulationChartTooltipSettings>
<!-- Enable legend -->
<AccumulationChartLegendSettings Visible="true">
</AccumulationChartLegendSettings>
</SfAccumulationChart>Understanding Data Binding
Key Properties
- DataSource: Your data collection (List, IEnumerable, etc.)
- XName: Property name for category labels (string)
- YName: Property name for numeric values (number)
Data Model Requirements
Your data class must have: 1. A property for labels/categories (mapped to XName) 2. A property for numeric values (mapped to YName)
public class ChartData
{
public string Category { get; set; } // For XName
public double Value { get; set; } // For YName
}Different Data Types
With percentage data:
public List<MarketShare> MarketData = new List<MarketShare>
{
new MarketShare { Company = "Company A", Share = 35.5 },
new MarketShare { Company = "Company B", Share = 28.3 },
new MarketShare { Company = "Company C", Share = 20.1 },
new MarketShare { Company = "Others", Share = 16.1 }
};With integer counts:
public List<SurveyResult> Results = new List<SurveyResult>
{
new SurveyResult { Option = "Yes", Count = 450 },
new SurveyResult { Option = "No", Count = 280 },
new SurveyResult { Option = "Maybe", Count = 170 }
};Complete Working Example
Here's a full-featured pie chart with all essential elements:
@page "/sales-chart"
@using Syncfusion.Blazor.Charts
<div class="container">
<h2>Q4 2025 Sales Performance</h2>
<SfAccumulationChart Title="Revenue Distribution by Product Line"
Height="450px"
Width="100%"
Background="transparent">
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@RevenueData"
XName="ProductLine"
YName="Revenue"
Name="Revenue">
<!-- Data labels with product names -->
<AccumulationDataLabelSettings Visible="true"
Name="ProductLine"
Position="Syncfusion.Blazor.Charts.AccumulationLabelPosition.Outside">
<AccumulationDataLabelConnector Length="20px">
</AccumulationDataLabelConnector>
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<!-- Tooltip with currency formatting -->
<AccumulationChartTooltipSettings Enable="true"
Format="${point.x}: <b>${point.y}M</b>">
</AccumulationChartTooltipSettings>
<!-- Legend positioned at bottom -->
<AccumulationChartLegendSettings Visible="true"
Position="Syncfusion.Blazor.Charts.LegendPosition.Bottom">
</AccumulationChartLegendSettings>
</SfAccumulationChart>
</div>
@code {
public class RevenueInfo
{
public string ProductLine { get; set; }
public double Revenue { get; set; }
}
public List<RevenueInfo> RevenueData = new List<RevenueInfo>
{
new RevenueInfo { ProductLine = "Software", Revenue = 125.5 },
new RevenueInfo { ProductLine = "Hardware", Revenue = 98.2 },
new RevenueInfo { ProductLine = "Services", Revenue = 76.8 },
new RevenueInfo { ProductLine = "Consulting", Revenue = 54.3 },
new RevenueInfo { ProductLine = "Training", Revenue = 25.2 }
};
}Troubleshooting Common Issues
Chart Not Rendering
Problem: Blank page or no chart visible
Solutions: 1. Verify script reference in index.html or _Host.cshtml 2. Check that AddSyncfusionBlazor() is called in Program.cs 3. Ensure namespaces are imported in _Imports.razor 4. Check browser console for JavaScript errors
Data Not Displaying
Problem: Chart renders but no data shown
Solutions: 1. Verify DataSource is not null or empty 2. Check XName and YName match your data class property names (case-sensitive) 3. Ensure YName property contains numeric values (not strings) 4. Check data initialization in OnInitialized or OnInitializedAsync if async
Theme Not Applied
Problem: Chart has no styling or wrong theme
Solutions: 1. Verify stylesheet link in <head> section 2. Check theme file path: _content/Syncfusion.Blazor.Themes/bootstrap5.css 3. Try hard refresh (Ctrl+F5) to clear cache 4. Verify Syncfusion.Blazor.Themes package is installed
Namespace Errors
Problem: SfAccumulationChart not recognized
Solutions: 1. Add @using Syncfusion.Blazor.Charts to page or _Imports.razor 2. Rebuild solution 3. Verify Syncfusion.Blazor.Charts NuGet package is installed
Next Steps
Now that you have a basic accumulation chart working:
1. Explore Chart Types - Learn about doughnut, funnel, and pyramid charts 2. Customize Data Labels - Add formatting, positioning, and templates 3. Style Your Charts - Apply gradients, colors, and themes 4. Add Interactivity - Implement events, selection, and animations 5. Optimize for Production - Configure licensing and performance