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