Syncfusion React Accumulation Chart

syncfusion/react-ui-components-skills/skills/syncfusion-react-accumulation-chart

作者 syncfusion6fb1c883a8412b611b95f839e0cb06e1fc8170a8無授權條款收錄於 2026年10月9日更新於 2026年10月9日

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.

AI 產生的概覽

指導實作 Syncfusion React 累積圖表,包括圓餅圖、環圈圖、漏斗圖與金字塔圖。

功能
此技能提供建構 Syncfusion React AccumulationChartComponent 視覺化的說明與參考資料,涵蓋圓餅圖、環圈圖、漏斗圖與金字塔圖等類型。文件內容涉及資料標籤、圖例、工具提示、分組、智慧標籤、向下鑽研、爆炸效果、佈景主題、無障礙、空資料點、註解,以及匯出與列印的設定。另包含元件屬性、數列指示詞、方法與事件的 API 參考及程式碼範例。
適用情境
適用於在 React 應用程式中使用 Syncfusion 圖表實作圓形或比例資料視覺化的情境,例如圓餅圖、環圈圖、漏斗圖或金字塔圖。適合處理百分比分佈、市場佔有率、銷售漏斗、人口金字塔,或工具提示、圖例、向下鑽研等互動功能的任務。
執行需求
需要一個已安裝 @syncfusion/ej2-react-charts 套件並註冊 Syncfusion CSS 佈景主題的 React 專案。此技能不隨附指令碼,僅為說明與參考文件。

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 [blocked]

  • 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 [blocked]

  • 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 [blocked]

  • 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 [blocked]

  • 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 [blocked]

  • 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 [blocked]

  • 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 [blocked]

  • 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 [blocked]

  • 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 [blocked]

  • 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 [blocked]

  • 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 [blocked]

  • 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 [blocked]

  • 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 [blocked]

  • 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 [blocked]

  • 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:

tsx
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

tsx
<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

tsx
<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)

tsx
<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

tsx
<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
PropertyTypeDefaultDescription
dataSourceObject[] | DataManager''Data source for the chart
seriesAccumulationSeriesModel[]-Collection of series configurations
titlestringnullMain title of the chart
subTitlestringnullSubtitle displayed below the main title
widthstringnullWidth of the chart ('100px', '100%')
heightstringnullHeight of the chart ('100px', '100%')
themeAccumulationTheme'Material'Visual theme (Material, Bootstrap5, Fluent, Tailwind, etc.)
backgroundstringnullBackground color (hex or rgba)
backgroundImagestringnullBackground image URL
Feature Properties
PropertyTypeDefaultDescription
enableSmartLabelsbooleantruePrevent label overlapping with smart positioning
enableAnimationbooleantrueEnable animations for chart rendering
enableBorderOnMouseMovebooleantrueShow border on mouse hover
enableExportbooleantrueEnable export functionality (JPEG, PNG, SVG, PDF)
useGroupingSeparatorbooleanfalseUse thousand separators in numbers
enablePersistencebooleanfalsePersist component state across page reloads
enableRtlbooleanfalseEnable right-to-left rendering
enableHtmlSanitizerbooleanfalseSanitize untrusted HTML values
Interactive Properties
PropertyTypeDefaultDescription
selectionModeAccumulationSelectionMode'None'Point selection mode ('None', 'Point')
selectionPatternSelectionPattern'None'Pattern for selected points (Chessboard, Dots, etc.)
highlightModeAccumulationHighlightMode'None'Point highlighting mode ('None', 'Point')
highlightPatternSelectionPattern'None'Pattern for highlighted points
highlightColorstring''Color for highlighted points
isMultiSelectbooleanfalseAllow multiple point selection
selectedDataIndexesIndexesModel[][]Initially selected point indexes
Layout Properties
PropertyTypeDefaultDescription
centerPieCenterModel{x: '50%', y: '50%'}Center position of pie chart
marginMarginModel-Chart margins (left, right, top, bottom)
borderBorderModel-Chart border (color, width)
legendSettingsLegendSettingsModel-Legend configuration
tooltipTooltipSettingsModel-Tooltip configuration
annotationsAccumulationAnnotationSettingsModel[]-Chart annotations
centerLabelCenterLabelModel-Label at chart center
Accessibility Properties
PropertyTypeDefaultDescription
accessibilityAccessibilityModel-Accessibility configuration for screen readers
focusBorderColorstringnullCustom focus border color
focusBorderWidthnumber1.5Focus border width in pixels
focusBorderMarginnumber0Focus border margin in pixels
localestring'en-US'Localization culture string

AccumulationSeriesDirective Properties

PropertyTypeDefaultDescription
typestring'Pie'Chart type ('Pie', 'Funnel', 'Pyramid')
dataSourceObject[]-Data array for the series
xNamestring-Property name for category/label values
yNamestring-Property name for numeric values
radiusstring'80%'Outer radius of pie/doughnut
innerRadiusstring'0%'Inner radius (doughnut hole)
startAnglenumber0Starting angle (0-360 degrees)
endAnglenumber360Ending angle (0-360 degrees)
explodebooleanfalseEnable click-to-explode functionality
explodeAllbooleanfalseExplode all slices initially
explodeIndexnumber-Index of slice to explode by default
explodeOffsetstring'30%'Distance when slice is exploded
neckWidthstring'20%'Funnel neck width
neckHeightstring'20%'Funnel neck height
gapRationumber0Gap between funnel/pyramid segments (0-1)
widthstring'80%'Funnel/pyramid width
heightstring'80%'Funnel/pyramid height
groupTostring-Value/count threshold for grouping
groupModestring'Value'Grouping mode ('Value', 'Point')
pointColorMappingstring-Property name for point colors
borderRadiusnumber0Corner radius for rounded slices
applyPatternbooleanfalseApply pattern fills to slices

Methods

MethodParametersDescription
export()type: ExportType, fileName: stringExport chart (JPEG, PNG, SVG, PDF)
print()id?: string[] | string | ElementPrint chart
calculateBounds()-Calculate chart bounds
setAnnotationValue()annotationIndex: number, content: stringUpdate annotation dynamically

Events

EventArgs TypeDescription
loadIAccLoadedEventArgsBefore chart loads
loadedIAccLoadedEventArgsAfter chart loads
seriesRenderIAccSeriesRenderEventArgsBefore series renders
pointRenderIAccPointRenderEventArgsBefore each point renders
textRenderIAccTextRenderEventArgsBefore data labels render
legendRenderILegendRenderEventArgsBefore legend renders
legendClickIAccLegendClickEventArgsWhen legend item is clicked
annotationRenderIAnnotationRenderEventArgsBefore annotation renders
tooltipRenderITooltipRenderEventArgsBefore tooltip renders
pointClickIPointEventArgsWhen point is clicked
pointMoveIPointEventArgsWhen mouse moves over point
chartMouseClickIMouseEventArgsWhen chart is clicked
chartMouseDownIMouseEventArgsOn mouse down event
chartMouseUpIMouseEventArgsOn mouse up event
chartMouseMoveIMouseEventArgsWhen mouse moves over chart
chartMouseLeaveIMouseEventArgsWhen mouse leaves chart
chartDoubleClickIMouseEventArgsWhen chart is double-clicked
animationCompleteIAccAnimationCompleteEventArgsAfter animation completes
selectionCompleteIAccSelectionCompleteEventArgsAfter selection completes
resizedIAccResizeEventArgsAfter window resize
beforeResizeIAccBeforeResizeEventArgsBefore window resize
beforePrintIPrintEventArgsBefore print starts
beforeExportIExportEventArgsBefore export starts
afterExportIAfterExportEventArgsAfter export completes

Key Props Summary

PropertyPurposeExample Values
typeChart type'Pie', 'Funnel', 'Pyramid'
radiusOuter size'90%', '100%'
innerRadiusDoughnut hole'0%' (pie), '40%' (doughnut)
startAngle / endAngleSlice range0 to 360
explodeEnable explodetrue, false
neckWidth / neckHeightFunnel neck'25%', '5%'
gapRatioSegment spacing0 to 1
enableSmartLabelsSmart positioningtrue, false

Common Use Cases

  1. Market Share Analysis: Pie/doughnut charts showing competitive distribution
  2. Sales Funnels: Funnel charts for conversion tracking at each stage
  3. Budget Allocation: Pie charts showing spending categories
  4. Survey Results: Doughnut charts with percentage breakdowns
  5. Population Demographics: Pyramid charts for age distribution
  6. Process Efficiency: Funnel charts showing drop-off rates
  7. Portfolio Distribution: Pie charts for asset allocation
  8. Website Traffic Sources: Doughnut charts with referral data
  9. Project Time Allocation: Pie charts for resource distribution
  10. 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

來源與署名

來源:syncfusion/react-ui-components-skills位於skills/syncfusion-react-accumulation-chart提交6fb1c88

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架