Implementing Syncfusion React Accumulation Charts
A comprehensive skill for implementing Syncfusion's React Accumulation Chart components (AccumulationChartComponent), which provide circular and hierarchical data visualizations including Pie, Doughnut, Funnel, and Pyramid charts with rich interactive features, export capabilities, and full accessibility support.
When to Use This Skill
Use this skill when you need to:
- Create pie or doughnut charts for proportional data display
- Implement funnel or pyramid charts for hierarchical/process visualization
- Display percentage-based or categorical data in circular layouts
- Add interactive features like tooltips, legends, and data labels
- Implement smart label positioning to avoid overlaps
- Create drill-down or multi-level accumulation charts
- Apply explode effects to highlight specific data points
- Group small data values for better visualization
- Customize chart appearance with themes, colors, and patterns
- Handle empty or missing data points elegantly
- Implement accessible data visualizations with WCAG compliance
Component Overview
The Syncfusion React Accumulation Chart component provides four primary chart types:
- Pie Chart: Circular chart divided into slices representing data proportions
- Doughnut Chart: Pie chart with a hollow center (configurable inner radius)
- Funnel Chart: Inverted triangle showing progressive reduction (sales funnels, conversion rates)
- Pyramid Chart: Triangle showing hierarchical data (population pyramids, organizational structures)
Key Features:
- Smart labels that avoid overlapping
- Grouping based on value or point count
- Interactive tooltips and legends
- Explode effects for emphasis
- Semi-pie charts with custom angles
- Multi-level drill-down capability
- Border radius for modern appearance
- Pattern fills and custom colors
Documentation and Navigation Guide
Getting Started
📄 Read: references/getting-started.md
- Installing @syncfusion/ej2-react-charts package
- Setting up React project (Vite or Create React App)
- Importing AccumulationChartComponent
- Registering CSS themes
- Creating your first pie chart with data binding
- Understanding AccumulationSeriesCollectionDirective pattern
- Basic series configuration (xName, yName, dataSource)
Pie and Doughnut Charts
📄 Read: references/pie-doughnut-charts.md
- Creating basic pie charts with PieSeries injection
- Customizing radius (default 80%, custom values)
- Positioning pie center (centerX, centerY properties)
- Creating doughnut charts with innerRadius
- Various radius pie charts (different slice sizes)
- Semi-pie charts using startAngle and endAngle
- Color and text mapping from data source
- Border radius for modern rounded slices
- Hiding/showing borders on mouse hover
- Applying pattern fills (stripes, dots, grids)
- Multi-level drill-down with pointClick event
- Point customization with pointRender event
Funnel and Pyramid Charts
📄 Read: references/funnel-pyramid-charts.md
- Creating funnel charts with FunnelSeries injection
- Funnel size customization (width and height)
- Neck size configuration (neckWidth, neckHeight)
- Gap between segments (gapRatio 0 to 1)
- Funnel rendering modes (Standard vs Trapezoidal)
- Creating pyramid charts with PyramidSeries injection
- Pyramid rendering modes (Linear vs Surface)
- Pyramid size customization
- Explode effects (explode, explodeOffset, explodeIndex)
- Smart data label positioning for funnels/pyramids
Data Labels
📄 Read: references/data-labels.md
- Enabling data labels (visible property, AccumulationDataLabel injection)
- Positioning labels (Inside vs Outside)
- Rotating data labels (angle and enableRotation)
- Smart labels to prevent overlapping (enableSmartLabels)
- Formatting label text (n, p, c number formats)
- Custom data label templates with HTML
- Connector line customization (type, color, width, length, dashArray)
- Text mapping from data source (name property)
- Customizing labels with textRender event
- Text wrapping (textWrap, maxWidth)
- Displaying percentages in labels (textRender vs template approaches)
Legend Configuration
📄 Read: references/legend.md
- Enabling legend (AccumulationLegend injection)
- Position and alignment (left, right, top, bottom, center, far, near)
- Reversing legend item order
- Legend shape customization (Circle, Rectangle, Triangle, etc.)
- Legend and legend item size configuration
- Automatic pagination for many items
- Text wrapping for long labels (textWrap, maximumLabelWidth)
- Animation on legend click toggle
- Legend title configuration and styling
- Arrow page navigation (enablePages false)
- Legend item padding adjustment
- Layout options (horizontal, vertical, auto with maximumColumns)
- Custom legend templates with HTML
- Fixed width legend items
Tooltip Customization
📄 Read: references/tooltip.md
- Enabling tooltips (AccumulationTooltip injection)
- Custom tooltip headers
- Format strings (${point.x}, ${point.y}, ${series.name})
- Tooltip mapping from data source (tooltipMappingName)
- Custom tooltip templates with HTML/React components
- Fixed tooltip positioning (location property)
- Tooltip styling and appearance
Data Grouping
📄 Read: references/grouping.md
- Grouping by value threshold (groupTo property)
- Grouping by point count
- Group mode configuration (Value vs Point)
- Custom group names and labels
- Group appearance customization
- When to use grouping for better visualization
Annotations
📄 Read: references/annotations.md
- Adding annotations with AccumulationAnnotation injection
- Annotation content and HTML templates
- Positioning annotations (x, y coordinates)
- Coordinate units (Pixel vs Point)
- Multiple annotations per chart
- Dynamic annotation updates
Customization and Styling
📄 Read: references/customization.md
- Point-level customization with pointRender event
- Custom color schemes and palettes
- Setting colors per data point (fill property)
- Border customization (width, color)
- Pattern fills for slices (applyPattern)
- Point-specific styling based on data values
- Conditional styling patterns
Accessibility Features
📄 Read: references/accessibility.md
- WCAG 2.1 compliance features
- Keyboard navigation support (Tab, Arrow keys)
- ARIA attributes configuration
- Screen reader support and announcements
- High contrast mode compatibility
- Advanced accessibility configuration
- Focus indicators and visible focus
Empty Points Handling
📄 Read: references/empty-points.md
- Handling null, undefined, or NaN data
- Empty point modes (Zero, Drop, Average, Gap)
- Customizing empty point appearance
- Fill and border configuration for empty points
- When to use each empty point mode
Appearance and Theming
📄 Read: references/appearance-theming.md
- Built-in themes (Material, Bootstrap, Fluent, Tailwind, Fabric)
- Importing and applying themes
- Gradient fills for slices
- Title and subtitle configuration
- Dynamic data updates and animation
- Chart dimensions and responsive sizing
Export and Print
📄 Read: references/export-print.md
- Enabling export functionality with Export module
- Export to image formats (PNG, JPEG)
- Export to PDF and SVG
- Export customization with beforeExport event
- Print chart functionality
- Exporting multiple charts
- After export event handling
- File naming conventions and best practices
API Reference
📄 Read: references/api-reference.md
- Complete AccumulationChartComponent properties reference
- AccumulationSeriesDirective properties
- All methods (export, print, setAnnotationValue, calculateBounds)
- All events (lifecycle, rendering, mouse, selection, export)
- Common model interfaces (LegendSettings, TooltipSettings, DataLabel)
- Module services and injection requirements
- Event argument interfaces
- Selection patterns reference
- Themes reference
- Complete usage examples with TypeScript
Quick Start Example
Here's a minimal example to create a basic pie chart:
import {
AccumulationChartComponent,
AccumulationSeriesCollectionDirective,
AccumulationSeriesDirective,
Inject,
AccumulationLegend,
AccumulationDataLabel,
AccumulationTooltip,
PieSeries
} from '@syncfusion/ej2-react-charts';
function App() {
const data = [
{ x: 'Chrome', y: 61.3, text: 'Chrome: 61.3%' },
{ x: 'Safari', y: 24.6, text: 'Safari: 24.6%' },
{ x: 'Edge', y: 5.0, text: 'Edge: 5.0%' },
{ x: 'Firefox', y: 4.8, text: 'Firefox: 4.8%' },
{ x: 'Others', y: 4.3, text: 'Others: 4.3%' }
];
return (
<AccumulationChartComponent
id='pie-chart'
title='Browser Market Share'
legendSettings={{ visible: true }}
tooltip={{ enable: true }}
enableSmartLabels={true}
>
<Inject services={[
AccumulationLegend,
AccumulationDataLabel,
AccumulationTooltip,
PieSeries
]} />
<AccumulationSeriesCollectionDirective>
<AccumulationSeriesDirective
dataSource={data}
xName='x'
yName='y'
radius='90%'
dataLabel={{
visible: true,
position: 'Outside',
name: 'text'
}}
/>
</AccumulationSeriesCollectionDirective>
</AccumulationChartComponent>
);
}
Common Patterns
Pattern 1: Doughnut Chart with Legend
<AccumulationChartComponent
id='doughnut-chart'
legendSettings={{ visible: true, position: 'Right' }}
>
<Inject services={[AccumulationLegend, PieSeries]} />
<AccumulationSeriesCollectionDirective>
<AccumulationSeriesDirective
dataSource={data}
xName='category'
yName='value'
innerRadius='40%' // Creates doughnut hole
radius='100%'
/>
</AccumulationSeriesCollectionDirective>
</AccumulationChartComponent>
Pattern 2: Funnel Chart with Data Labels
<AccumulationChartComponent id='funnel-chart'>
<Inject services={[FunnelSeries, AccumulationDataLabel]} />
<AccumulationSeriesCollectionDirective>
<AccumulationSeriesDirective
dataSource={salesData}
xName='stage'
yName='count'
type='Funnel'
neckWidth='25%'
neckHeight='5%'
gapRatio={0.08}
dataLabel={{ visible: true, position: 'Outside' }}
/>
</AccumulationSeriesCollectionDirective>
</AccumulationChartComponent>
Pattern 3: Semi-Pie Chart (Gauge Style)
<AccumulationSeriesDirective
dataSource={data}
xName='x'
yName='y'
startAngle={270} // Start from bottom
endAngle={90} // End at bottom (semi-circle)
radius='100%'
innerRadius='40%'
dataLabel={{ visible: true, position: 'Inside' }}
/>
Pattern 4: Exploded Pie Chart
<AccumulationSeriesDirective
dataSource={data}
xName='product'
yName='sales'
explode={true} // Enable click-to-explode
explodeOffset='10%' // Distance when exploded
explodeIndex={2} // Explode third slice by default
explodeAll={false} // Don't explode all at once
/>
API Reference
AccumulationChartComponent Properties
Core Properties
| Property |
Type |
Default |
Description |
dataSource |
Object[] | DataManager |
'' |
Data source for the chart |
series |
AccumulationSeriesModel[] |
- |
Collection of series configurations |
title |
string |
null |
Main title of the chart |
subTitle |
string |
null |
Subtitle displayed below the main title |
width |
string |
null |
Width of the chart ('100px', '100%') |
height |
string |
null |
Height of the chart ('100px', '100%') |
theme |
AccumulationTheme |
'Material' |
Visual theme (Material, Bootstrap5, Fluent, Tailwind, etc.) |
background |
string |
null |
Background color (hex or rgba) |
backgroundImage |
string |
null |
Background image URL |
Feature Properties
| Property |
Type |
Default |
Description |
enableSmartLabels |
boolean |
true |
Prevent label overlapping with smart positioning |
enableAnimation |
boolean |
true |
Enable animations for chart rendering |
enableBorderOnMouseMove |
boolean |
true |
Show border on mouse hover |
enableExport |
boolean |
true |
Enable export functionality (JPEG, PNG, SVG, PDF) |
useGroupingSeparator |
boolean |
false |
Use thousand separators in numbers |
enablePersistence |
boolean |
false |
Persist component state across page reloads |
enableRtl |
boolean |
false |
Enable right-to-left rendering |
enableHtmlSanitizer |
boolean |
false |
Sanitize untrusted HTML values |
Interactive Properties
| Property |
Type |
Default |
Description |
selectionMode |
AccumulationSelectionMode |
'None' |
Point selection mode ('None', 'Point') |
selectionPattern |
SelectionPattern |
'None' |
Pattern for selected points (Chessboard, Dots, etc.) |
highlightMode |
AccumulationHighlightMode |
'None' |
Point highlighting mode ('None', 'Point') |
highlightPattern |
SelectionPattern |
'None' |
Pattern for highlighted points |
highlightColor |
string |
'' |
Color for highlighted points |
isMultiSelect |
boolean |
false |
Allow multiple point selection |
selectedDataIndexes |
IndexesModel[] |
[] |
Initially selected point indexes |
Layout Properties
| Property |
Type |
Default |
Description |
center |
PieCenterModel |
{x: '50%', y: '50%'} |
Center position of pie chart |
margin |
MarginModel |
- |
Chart margins (left, right, top, bottom) |
border |
BorderModel |
- |
Chart border (color, width) |
legendSettings |
LegendSettingsModel |
- |
Legend configuration |
tooltip |
TooltipSettingsModel |
- |
Tooltip configuration |
annotations |
AccumulationAnnotationSettingsModel[] |
- |
Chart annotations |
centerLabel |
CenterLabelModel |
- |
Label at chart center |
Accessibility Properties
| Property |
Type |
Default |
Description |
accessibility |
AccessibilityModel |
- |
Accessibility configuration for screen readers |
focusBorderColor |
string |
null |
Custom focus border color |
focusBorderWidth |
number |
1.5 |
Focus border width in pixels |
focusBorderMargin |
number |
0 |
Focus border margin in pixels |
locale |
string |
'en-US' |
Localization culture string |
AccumulationSeriesDirective Properties
| Property |
Type |
Default |
Description |
type |
string |
'Pie' |
Chart type ('Pie', 'Funnel', 'Pyramid') |
dataSource |
Object[] |
- |
Data array for the series |
xName |
string |
- |
Property name for category/label values |
yName |
string |
- |
Property name for numeric values |
radius |
string |
'80%' |
Outer radius of pie/doughnut |
innerRadius |
string |
'0%' |
Inner radius (doughnut hole) |
startAngle |
number |
0 |
Starting angle (0-360 degrees) |
endAngle |
number |
360 |
Ending angle (0-360 degrees) |
explode |
boolean |
false |
Enable click-to-explode functionality |
explodeAll |
boolean |
false |
Explode all slices initially |
explodeIndex |
number |
- |
Index of slice to explode by default |
explodeOffset |
string |
'30%' |
Distance when slice is exploded |
neckWidth |
string |
'20%' |
Funnel neck width |
neckHeight |
string |
'20%' |
Funnel neck height |
gapRatio |
number |
0 |
Gap between funnel/pyramid segments (0-1) |
width |
string |
'80%' |
Funnel/pyramid width |
height |
string |
'80%' |
Funnel/pyramid height |
groupTo |
string |
- |
Value/count threshold for grouping |
groupMode |
string |
'Value' |
Grouping mode ('Value', 'Point') |
pointColorMapping |
string |
- |
Property name for point colors |
borderRadius |
number |
0 |
Corner radius for rounded slices |
applyPattern |
boolean |
false |
Apply pattern fills to slices |
Methods
| Method |
Parameters |
Description |
export() |
type: ExportType, fileName: string |
Export chart (JPEG, PNG, SVG, PDF) |
print() |
id?: string[] | string | Element |
Print chart |
calculateBounds() |
- |
Calculate chart bounds |
setAnnotationValue() |
annotationIndex: number, content: string |
Update annotation dynamically |
Events
| Event |
Args Type |
Description |
load |
IAccLoadedEventArgs |
Before chart loads |
loaded |
IAccLoadedEventArgs |
After chart loads |
seriesRender |
IAccSeriesRenderEventArgs |
Before series renders |
pointRender |
IAccPointRenderEventArgs |
Before each point renders |
textRender |
IAccTextRenderEventArgs |
Before data labels render |
legendRender |
ILegendRenderEventArgs |
Before legend renders |
legendClick |
IAccLegendClickEventArgs |
When legend item is clicked |
annotationRender |
IAnnotationRenderEventArgs |
Before annotation renders |
tooltipRender |
ITooltipRenderEventArgs |
Before tooltip renders |
pointClick |
IPointEventArgs |
When point is clicked |
pointMove |
IPointEventArgs |
When mouse moves over point |
chartMouseClick |
IMouseEventArgs |
When chart is clicked |
chartMouseDown |
IMouseEventArgs |
On mouse down event |
chartMouseUp |
IMouseEventArgs |
On mouse up event |
chartMouseMove |
IMouseEventArgs |
When mouse moves over chart |
chartMouseLeave |
IMouseEventArgs |
When mouse leaves chart |
chartDoubleClick |
IMouseEventArgs |
When chart is double-clicked |
animationComplete |
IAccAnimationCompleteEventArgs |
After animation completes |
selectionComplete |
IAccSelectionCompleteEventArgs |
After selection completes |
resized |
IAccResizeEventArgs |
After window resize |
beforeResize |
IAccBeforeResizeEventArgs |
Before window resize |
beforePrint |
IPrintEventArgs |
Before print starts |
beforeExport |
IExportEventArgs |
Before export starts |
afterExport |
IAfterExportEventArgs |
After export completes |
Key Props Summary
| Property |
Purpose |
Example Values |
type |
Chart type |
'Pie', 'Funnel', 'Pyramid' |
radius |
Outer size |
'90%', '100%' |
innerRadius |
Doughnut hole |
'0%' (pie), '40%' (doughnut) |
startAngle / endAngle |
Slice range |
0 to 360 |
explode |
Enable explode |
true, false |
neckWidth / neckHeight |
Funnel neck |
'25%', '5%' |
gapRatio |
Segment spacing |
0 to 1 |
enableSmartLabels |
Smart positioning |
true, false |
Common Use Cases
- Market Share Analysis: Pie/doughnut charts showing competitive distribution
- Sales Funnels: Funnel charts for conversion tracking at each stage
- Budget Allocation: Pie charts showing spending categories
- Survey Results: Doughnut charts with percentage breakdowns
- Population Demographics: Pyramid charts for age distribution
- Process Efficiency: Funnel charts showing drop-off rates
- Portfolio Distribution: Pie charts for asset allocation
- Website Traffic Sources: Doughnut charts with referral data
- Project Time Allocation: Pie charts for resource distribution
- Customer Segmentation: Multiple pie charts for cohort analysis
Tips and Best Practices
- Use smart labels when dealing with many small slices to prevent overlap
- Group small values (< 5%) into "Others" category for clarity
- Prefer doughnut over pie when displaying a key metric in the center
- Use funnel mode 'Trapezoidal' for clearer stage comparison
- Enable tooltips for detailed information without cluttering labels
- Choose appropriate colors that provide sufficient contrast
- Consider accessibility by providing text alternatives and keyboard navigation
- Use explode effects sparingly to highlight important data points
- Set enableSmartLabels to true for charts with 8+ data points
- Apply themes consistently with other charts in your application
Related Components
When building comprehensive dashboards, combine Accumulation Charts with:
- Line/Area Charts for trend analysis
- Bar/Column Charts for comparisons
- Gantt Charts for project timelines
- TreeMap for hierarchical proportional data
1---
2name: syncfusion-react-accumulation-chart
3description: Implement Syncfusion React Accumulation Charts including Pie, Doughnut, Funnel, and Pyramid chart types. Use this skill when users need circular data visualization, percentage-based charts, or proportional data displays. Covers data labels, legends, tooltips, grouping, smart labels, drill-down charts, explode effects, theming, accessibility, export/print capabilities, and dynamic data updates.
4metadata:
5 author: "Syncfusion Inc"
6 version: "34.1.29"
7 category: "Data Visualization"
8---
9
10# Implementing Syncfusion React Accumulation Charts
11
12A comprehensive skill for implementing Syncfusion's React Accumulation Chart components (`AccumulationChartComponent`), which provide circular and hierarchical data visualizations including Pie, Doughnut, Funnel, and Pyramid charts with rich interactive features, export capabilities, and full accessibility support.
13
14## When to Use This Skill
15
16Use this skill when you need to:
17- Create pie or doughnut charts for proportional data display
18- Implement funnel or pyramid charts for hierarchical/process visualization
19- Display percentage-based or categorical data in circular layouts
20- Add interactive features like tooltips, legends, and data labels
21- Implement smart label positioning to avoid overlaps
22- Create drill-down or multi-level accumulation charts
23- Apply explode effects to highlight specific data points
24- Group small data values for better visualization
25- Customize chart appearance with themes, colors, and patterns
26- Handle empty or missing data points elegantly
27- Implement accessible data visualizations with WCAG compliance
28
29## Component Overview
30
31The Syncfusion React Accumulation Chart component provides four primary chart types:
32
33- **Pie Chart:** Circular chart divided into slices representing data proportions
34- **Doughnut Chart:** Pie chart with a hollow center (configurable inner radius)
35- **Funnel Chart:** Inverted triangle showing progressive reduction (sales funnels, conversion rates)
36- **Pyramid Chart:** Triangle showing hierarchical data (population pyramids, organizational structures)
37
38**Key Features:**
39- Smart labels that avoid overlapping
40- Grouping based on value or point count
41- Interactive tooltips and legends
42- Explode effects for emphasis
43- Semi-pie charts with custom angles
44- Multi-level drill-down capability
45- Border radius for modern appearance
46- Pattern fills and custom colors
47
48## Documentation and Navigation Guide
49
50### Getting Started
51
52📄 **Read:** [references/getting-started.md](references/getting-started.md)
53- Installing @syncfusion/ej2-react-charts package
54- Setting up React project (Vite or Create React App)
55- Importing AccumulationChartComponent
56- Registering CSS themes
57- Creating your first pie chart with data binding
58- Understanding AccumulationSeriesCollectionDirective pattern
59- Basic series configuration (xName, yName, dataSource)
60
61### Pie and Doughnut Charts
62
63📄 **Read:** [references/pie-doughnut-charts.md](references/pie-doughnut-charts.md)
64- Creating basic pie charts with PieSeries injection
65- Customizing radius (default 80%, custom values)
66- Positioning pie center (centerX, centerY properties)
67- Creating doughnut charts with innerRadius
68- Various radius pie charts (different slice sizes)
69- Semi-pie charts using startAngle and endAngle
70- Color and text mapping from data source
71- Border radius for modern rounded slices
72- Hiding/showing borders on mouse hover
73- Applying pattern fills (stripes, dots, grids)
74- Multi-level drill-down with pointClick event
75- Point customization with pointRender event
76
77### Funnel and Pyramid Charts
78
79📄 **Read:** [references/funnel-pyramid-charts.md](references/funnel-pyramid-charts.md)
80- Creating funnel charts with FunnelSeries injection
81- Funnel size customization (width and height)
82- Neck size configuration (neckWidth, neckHeight)
83- Gap between segments (gapRatio 0 to 1)
84- Funnel rendering modes (Standard vs Trapezoidal)
85- Creating pyramid charts with PyramidSeries injection
86- Pyramid rendering modes (Linear vs Surface)
87- Pyramid size customization
88- Explode effects (explode, explodeOffset, explodeIndex)
89- Smart data label positioning for funnels/pyramids
90
91### Data Labels
92
93📄 **Read:** [references/data-labels.md](references/data-labels.md)
94- Enabling data labels (visible property, AccumulationDataLabel injection)
95- Positioning labels (Inside vs Outside)
96- Rotating data labels (angle and enableRotation)
97- Smart labels to prevent overlapping (enableSmartLabels)
98- Formatting label text (n, p, c number formats)
99- Custom data label templates with HTML
100- Connector line customization (type, color, width, length, dashArray)
101- Text mapping from data source (name property)
102- Customizing labels with textRender event
103- Text wrapping (textWrap, maxWidth)
104- Displaying percentages in labels (textRender vs template approaches)
105
106### Legend Configuration
107
108📄 **Read:** [references/legend.md](references/legend.md)
109- Enabling legend (AccumulationLegend injection)
110- Position and alignment (left, right, top, bottom, center, far, near)
111- Reversing legend item order
112- Legend shape customization (Circle, Rectangle, Triangle, etc.)
113- Legend and legend item size configuration
114- Automatic pagination for many items
115- Text wrapping for long labels (textWrap, maximumLabelWidth)
116- Animation on legend click toggle
117- Legend title configuration and styling
118- Arrow page navigation (enablePages false)
119- Legend item padding adjustment
120- Layout options (horizontal, vertical, auto with maximumColumns)
121- Custom legend templates with HTML
122- Fixed width legend items
123
124### Tooltip Customization
125
126📄 **Read:** [references/tooltip.md](references/tooltip.md)
127- Enabling tooltips (AccumulationTooltip injection)
128- Custom tooltip headers
129- Format strings (${point.x}, ${point.y}, ${series.name})
130- Tooltip mapping from data source (tooltipMappingName)
131- Custom tooltip templates with HTML/React components
132- Fixed tooltip positioning (location property)
133- Tooltip styling and appearance
134
135### Data Grouping
136
137📄 **Read:** [references/grouping.md](references/grouping.md)
138- Grouping by value threshold (groupTo property)
139- Grouping by point count
140- Group mode configuration (Value vs Point)
141- Custom group names and labels
142- Group appearance customization
143- When to use grouping for better visualization
144
145### Annotations
146
147📄 **Read:** [references/annotations.md](references/annotations.md)
148- Adding annotations with AccumulationAnnotation injection
149- Annotation content and HTML templates
150- Positioning annotations (x, y coordinates)
151- Coordinate units (Pixel vs Point)
152- Multiple annotations per chart
153- Dynamic annotation updates
154
155### Customization and Styling
156
157📄 **Read:** [references/customization.md](references/customization.md)
158- Point-level customization with pointRender event
159- Custom color schemes and palettes
160- Setting colors per data point (fill property)
161- Border customization (width, color)
162- Pattern fills for slices (applyPattern)
163- Point-specific styling based on data values
164- Conditional styling patterns
165
166### Accessibility Features
167
168📄 **Read:** [references/accessibility.md](references/accessibility.md)
169- WCAG 2.1 compliance features
170- Keyboard navigation support (Tab, Arrow keys)
171- ARIA attributes configuration
172- Screen reader support and announcements
173- High contrast mode compatibility
174- Advanced accessibility configuration
175- Focus indicators and visible focus
176
177### Empty Points Handling
178
179📄 **Read:** [references/empty-points.md](references/empty-points.md)
180- Handling null, undefined, or NaN data
181- Empty point modes (Zero, Drop, Average, Gap)
182- Customizing empty point appearance
183- Fill and border configuration for empty points
184- When to use each empty point mode
185
186### Appearance and Theming
187
188📄 **Read:** [references/appearance-theming.md](references/appearance-theming.md)
189- Built-in themes (Material, Bootstrap, Fluent, Tailwind, Fabric)
190- Importing and applying themes
191- Gradient fills for slices
192- Title and subtitle configuration
193- Dynamic data updates and animation
194- Chart dimensions and responsive sizing
195
196### Export and Print
197
198📄 **Read:** [references/export-print.md](references/export-print.md)
199- Enabling export functionality with Export module
200- Export to image formats (PNG, JPEG)
201- Export to PDF and SVG
202- Export customization with beforeExport event
203- Print chart functionality
204- Exporting multiple charts
205- After export event handling
206- File naming conventions and best practices
207
208### API Reference
209
210📄 **Read:** [references/api-reference.md](references/api-reference.md)
211- Complete AccumulationChartComponent properties reference
212- AccumulationSeriesDirective properties
213- All methods (export, print, setAnnotationValue, calculateBounds)
214- All events (lifecycle, rendering, mouse, selection, export)
215- Common model interfaces (LegendSettings, TooltipSettings, DataLabel)
216- Module services and injection requirements
217- Event argument interfaces
218- Selection patterns reference
219- Themes reference
220- Complete usage examples with TypeScript
221
222## Quick Start Example
223
224Here's a minimal example to create a basic pie chart:
225
226```tsx
227import {
228 AccumulationChartComponent,
229 AccumulationSeriesCollectionDirective,
230 AccumulationSeriesDirective,
231 Inject,
232 AccumulationLegend,
233 AccumulationDataLabel,
234 AccumulationTooltip,
235 PieSeries
236} from '@syncfusion/ej2-react-charts';
237
238function App() {
239 const data = [
240 { x: 'Chrome', y: 61.3, text: 'Chrome: 61.3%' },
241 { x: 'Safari', y: 24.6, text: 'Safari: 24.6%' },
242 { x: 'Edge', y: 5.0, text: 'Edge: 5.0%' },
243 { x: 'Firefox', y: 4.8, text: 'Firefox: 4.8%' },
244 { x: 'Others', y: 4.3, text: 'Others: 4.3%' }
245 ];
246
247 return (
248 <AccumulationChartComponent
249 id='pie-chart'
250 title='Browser Market Share'
251 legendSettings={{ visible: true }}
252 tooltip={{ enable: true }}
253 enableSmartLabels={true}
254 >
255 <Inject services={[
256 AccumulationLegend,
257 AccumulationDataLabel,
258 AccumulationTooltip,
259 PieSeries
260 ]} />
261 <AccumulationSeriesCollectionDirective>
262 <AccumulationSeriesDirective
263 dataSource={data}
264 xName='x'
265 yName='y'
266 radius='90%'
267 dataLabel={{
268 visible: true,
269 position: 'Outside',
270 name: 'text'
271 }}
272 />
273 </AccumulationSeriesCollectionDirective>
274 </AccumulationChartComponent>
275 );
276}
277```
278
279## Common Patterns
280
281### Pattern 1: Doughnut Chart with Legend
282
283```tsx
284<AccumulationChartComponent
285 id='doughnut-chart'
286 legendSettings={{ visible: true, position: 'Right' }}
287>
288 <Inject services={[AccumulationLegend, PieSeries]} />
289 <AccumulationSeriesCollectionDirective>
290 <AccumulationSeriesDirective
291 dataSource={data}
292 xName='category'
293 yName='value'
294 innerRadius='40%' // Creates doughnut hole
295 radius='100%'
296 />
297 </AccumulationSeriesCollectionDirective>
298</AccumulationChartComponent>
299```
300
301### Pattern 2: Funnel Chart with Data Labels
302
303```tsx
304<AccumulationChartComponent id='funnel-chart'>
305 <Inject services={[FunnelSeries, AccumulationDataLabel]} />
306 <AccumulationSeriesCollectionDirective>
307 <AccumulationSeriesDirective
308 dataSource={salesData}
309 xName='stage'
310 yName='count'
311 type='Funnel'
312 neckWidth='25%'
313 neckHeight='5%'
314 gapRatio={0.08}
315 dataLabel={{ visible: true, position: 'Outside' }}
316 />
317 </AccumulationSeriesCollectionDirective>
318</AccumulationChartComponent>
319```
320
321### Pattern 3: Semi-Pie Chart (Gauge Style)
322
323```tsx
324<AccumulationSeriesDirective
325 dataSource={data}
326 xName='x'
327 yName='y'
328 startAngle={270} // Start from bottom
329 endAngle={90} // End at bottom (semi-circle)
330 radius='100%'
331 innerRadius='40%'
332 dataLabel={{ visible: true, position: 'Inside' }}
333/>
334```
335
336### Pattern 4: Exploded Pie Chart
337
338```tsx
339<AccumulationSeriesDirective
340 dataSource={data}
341 xName='product'
342 yName='sales'
343 explode={true} // Enable click-to-explode
344 explodeOffset='10%' // Distance when exploded
345 explodeIndex={2} // Explode third slice by default
346 explodeAll={false} // Don't explode all at once
347/>
348```
349
350## API Reference
351
352### AccumulationChartComponent Properties
353
354#### Core Properties
355
356| Property | Type | Default | Description |
357|----------|------|---------|-------------|
358| `dataSource` | Object[] \| DataManager | '' | Data source for the chart |
359| `series` | AccumulationSeriesModel[] | - | Collection of series configurations |
360| `title` | string | null | Main title of the chart |
361| `subTitle` | string | null | Subtitle displayed below the main title |
362| `width` | string | null | Width of the chart ('100px', '100%') |
363| `height` | string | null | Height of the chart ('100px', '100%') |
364| `theme` | AccumulationTheme | 'Material' | Visual theme (Material, Bootstrap5, Fluent, Tailwind, etc.) |
365| `background` | string | null | Background color (hex or rgba) |
366| `backgroundImage` | string | null | Background image URL |
367
368#### Feature Properties
369
370| Property | Type | Default | Description |
371|----------|------|---------|-------------|
372| `enableSmartLabels` | boolean | true | Prevent label overlapping with smart positioning |
373| `enableAnimation` | boolean | true | Enable animations for chart rendering |
374| `enableBorderOnMouseMove` | boolean | true | Show border on mouse hover |
375| `enableExport` | boolean | true | Enable export functionality (JPEG, PNG, SVG, PDF) |
376| `useGroupingSeparator` | boolean | false | Use thousand separators in numbers |
377| `enablePersistence` | boolean | false | Persist component state across page reloads |
378| `enableRtl` | boolean | false | Enable right-to-left rendering |
379| `enableHtmlSanitizer` | boolean | false | Sanitize untrusted HTML values |
380
381#### Interactive Properties
382
383| Property | Type | Default | Description |
384|----------|------|---------|-------------|
385| `selectionMode` | AccumulationSelectionMode | 'None' | Point selection mode ('None', 'Point') |
386| `selectionPattern` | SelectionPattern | 'None' | Pattern for selected points (Chessboard, Dots, etc.) |
387| `highlightMode` | AccumulationHighlightMode | 'None' | Point highlighting mode ('None', 'Point') |
388| `highlightPattern` | SelectionPattern | 'None' | Pattern for highlighted points |
389| `highlightColor` | string | '' | Color for highlighted points |
390| `isMultiSelect` | boolean | false | Allow multiple point selection |
391| `selectedDataIndexes` | IndexesModel[] | [] | Initially selected point indexes |
392
393#### Layout Properties
394
395| Property | Type | Default | Description |
396|----------|------|---------|-------------|
397| `center` | PieCenterModel | {x: '50%', y: '50%'} | Center position of pie chart |
398| `margin` | MarginModel | - | Chart margins (left, right, top, bottom) |
399| `border` | BorderModel | - | Chart border (color, width) |
400| `legendSettings` | LegendSettingsModel | - | Legend configuration |
401| `tooltip` | TooltipSettingsModel | - | Tooltip configuration |
402| `annotations` | AccumulationAnnotationSettingsModel[] | - | Chart annotations |
403| `centerLabel` | CenterLabelModel | - | Label at chart center |
404
405#### Accessibility Properties
406
407| Property | Type | Default | Description |
408|----------|------|---------|-------------|
409| `accessibility` | AccessibilityModel | - | Accessibility configuration for screen readers |
410| `focusBorderColor` | string | null | Custom focus border color |
411| `focusBorderWidth` | number | 1.5 | Focus border width in pixels |
412| `focusBorderMargin` | number | 0 | Focus border margin in pixels |
413| `locale` | string | 'en-US' | Localization culture string |
414
415### AccumulationSeriesDirective Properties
416
417| Property | Type | Default | Description |
418|----------|------|---------|-------------|
419| `type` | string | 'Pie' | Chart type ('Pie', 'Funnel', 'Pyramid') |
420| `dataSource` | Object[] | - | Data array for the series |
421| `xName` | string | - | Property name for category/label values |
422| `yName` | string | - | Property name for numeric values |
423| `radius` | string | '80%' | Outer radius of pie/doughnut |
424| `innerRadius` | string | '0%' | Inner radius (doughnut hole) |
425| `startAngle` | number | 0 | Starting angle (0-360 degrees) |
426| `endAngle` | number | 360 | Ending angle (0-360 degrees) |
427| `explode` | boolean | false | Enable click-to-explode functionality |
428| `explodeAll` | boolean | false | Explode all slices initially |
429| `explodeIndex` | number | - | Index of slice to explode by default |
430| `explodeOffset` | string | '30%' | Distance when slice is exploded |
431| `neckWidth` | string | '20%' | Funnel neck width |
432| `neckHeight` | string | '20%' | Funnel neck height |
433| `gapRatio` | number | 0 | Gap between funnel/pyramid segments (0-1) |
434| `width` | string | '80%' | Funnel/pyramid width |
435| `height` | string | '80%' | Funnel/pyramid height |
436| `groupTo` | string | - | Value/count threshold for grouping |
437| `groupMode` | string | 'Value' | Grouping mode ('Value', 'Point') |
438| `pointColorMapping` | string | - | Property name for point colors |
439| `borderRadius` | number | 0 | Corner radius for rounded slices |
440| `applyPattern` | boolean | false | Apply pattern fills to slices |
441
442### Methods
443
444| Method | Parameters | Description |
445|--------|------------|-------------|
446| `export()` | type: ExportType, fileName: string | Export chart (JPEG, PNG, SVG, PDF) |
447| `print()` | id?: string[] \| string \| Element | Print chart |
448| `calculateBounds()` | - | Calculate chart bounds |
449| `setAnnotationValue()` | annotationIndex: number, content: string | Update annotation dynamically |
450
451### Events
452
453| Event | Args Type | Description |
454|-------|-----------|-------------|
455| `load` | IAccLoadedEventArgs | Before chart loads |
456| `loaded` | IAccLoadedEventArgs | After chart loads |
457| `seriesRender` | IAccSeriesRenderEventArgs | Before series renders |
458| `pointRender` | IAccPointRenderEventArgs | Before each point renders |
459| `textRender` | IAccTextRenderEventArgs | Before data labels render |
460| `legendRender` | ILegendRenderEventArgs | Before legend renders |
461| `legendClick` | IAccLegendClickEventArgs | When legend item is clicked |
462| `annotationRender` | IAnnotationRenderEventArgs | Before annotation renders |
463| `tooltipRender` | ITooltipRenderEventArgs | Before tooltip renders |
464| `pointClick` | IPointEventArgs | When point is clicked |
465| `pointMove` | IPointEventArgs | When mouse moves over point |
466| `chartMouseClick` | IMouseEventArgs | When chart is clicked |
467| `chartMouseDown` | IMouseEventArgs | On mouse down event |
468| `chartMouseUp` | IMouseEventArgs | On mouse up event |
469| `chartMouseMove` | IMouseEventArgs | When mouse moves over chart |
470| `chartMouseLeave` | IMouseEventArgs | When mouse leaves chart |
471| `chartDoubleClick` | IMouseEventArgs | When chart is double-clicked |
472| `animationComplete` | IAccAnimationCompleteEventArgs | After animation completes |
473| `selectionComplete` | IAccSelectionCompleteEventArgs | After selection completes |
474| `resized` | IAccResizeEventArgs | After window resize |
475| `beforeResize` | IAccBeforeResizeEventArgs | Before window resize |
476| `beforePrint` | IPrintEventArgs | Before print starts |
477| `beforeExport` | IExportEventArgs | Before export starts |
478| `afterExport` | IAfterExportEventArgs | After export completes |
479
480## Key Props Summary
481
482| Property | Purpose | Example Values |
483|----------|---------|----------------|
484| `type` | Chart type | `'Pie'`, `'Funnel'`, `'Pyramid'` |
485| `radius` | Outer size | `'90%'`, `'100%'` |
486| `innerRadius` | Doughnut hole | `'0%'` (pie), `'40%'` (doughnut) |
487| `startAngle` / `endAngle` | Slice range | `0` to `360` |
488| `explode` | Enable explode | `true`, `false` |
489| `neckWidth` / `neckHeight` | Funnel neck | `'25%'`, `'5%'` |
490| `gapRatio` | Segment spacing | `0` to `1` |
491| `enableSmartLabels` | Smart positioning | `true`, `false` |
492
493## Common Use Cases
494
4951. **Market Share Analysis:** Pie/doughnut charts showing competitive distribution
4962. **Sales Funnels:** Funnel charts for conversion tracking at each stage
4973. **Budget Allocation:** Pie charts showing spending categories
4984. **Survey Results:** Doughnut charts with percentage breakdowns
4995. **Population Demographics:** Pyramid charts for age distribution
5006. **Process Efficiency:** Funnel charts showing drop-off rates
5017. **Portfolio Distribution:** Pie charts for asset allocation
5028. **Website Traffic Sources:** Doughnut charts with referral data
5039. **Project Time Allocation:** Pie charts for resource distribution
50410. **Customer Segmentation:** Multiple pie charts for cohort analysis
505
506## Tips and Best Practices
507
508- **Use smart labels** when dealing with many small slices to prevent overlap
509- **Group small values** (< 5%) into "Others" category for clarity
510- **Prefer doughnut over pie** when displaying a key metric in the center
511- **Use funnel mode** 'Trapezoidal' for clearer stage comparison
512- **Enable tooltips** for detailed information without cluttering labels
513- **Choose appropriate colors** that provide sufficient contrast
514- **Consider accessibility** by providing text alternatives and keyboard navigation
515- **Use explode effects** sparingly to highlight important data points
516- **Set enableSmartLabels** to true for charts with 8+ data points
517- **Apply themes consistently** with other charts in your application
518
519## Related Components
520
521When building comprehensive dashboards, combine Accumulation Charts with:
522- Line/Area Charts for trend analysis
523- Bar/Column Charts for comparisons
524- Gantt Charts for project timelines
525- TreeMap for hierarchical proportional data