We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Overview

The React Pie Chart is a circular graphic with multiple slices, which is used for comparing the proportional values of different categories.


Pie legend

Legends are used to show information about each point, to know about its contribution towards the total sum. You can collapse the point using legend click.


Custom radius

Customize the radius of the pie to change the look and functionality of the chart.


Start and end angles

Customize the start and end angles of the chart to achieve a semi-pie.


Data label

Data labels display information about data points. Add a template to display data labels with HTML elements such as images, DIV, and spans for more informative data labels. You can rotate a data label by its given angle.


Smart labels

Arranges data labels smartly to avoid overlapping when the data point values fall in close range.


Grouped points

Group the points in a pie chart based on specific conditions. The grouped slices can be split into individual points by clicking the slice.


Drilldown operation

Users click a specific bar or segment of a chart to drill-down to a more detailed report.


Different radius

Customize the radius of individual slice using built-in APIs.


Pie center

The React Pie Chart’s center moves relative to the plot area. Labels may jump around when there are many slices in the plot area and the center can be set in a more spacious area.


Customization

Customize the look and feel of the pie using built-in APIs.


React Pie Chart Code Example

Easily get started with React Pie Chart by using a few lines of HTML and TS code, as demonstrated below. Also explore our React Pie Chart Example that shows how to render and configure the chart.

import { AccumulationChartComponent, AccumulationSeriesCollectionDirective, AccumulationSeriesDirective, Inject, PieSeries}
from'@syncfusion/ej2-react-charts';
import * as React from 'react';
class App extends React.Component<{}, {}> {
  public data1: any[]= [
    { x: 'United States', y: 45, text: 'USA', fill: '#00226C' },
    { x: 'Australia', y: 53, text: 'AUS: 14%', fill: '#0450C2' },
    { x: 'China', y: 56, text: 'CHN', fill: '#0073DC' },
    { x: 'India', y: 61, text: 'IND', fill: '#0D98FF' },
    { x: 'Japan', y: 40, text: 'JPN', fill: '#9CD9FF' },
    { x: 'United Kingdom', y: 20, text: 'UK', fill: '#0450C2' }
];

  public render() {
    return <AccumulationChartComponent id='charts'>
    <Inject services={[PieSeries]} />
    <AccumulationSeriesCollectionDirective>
      <AccumulationSeriesDirective dataSource={this.data1} xName='x' yName='y' type='Pie'/>
    </AccumulationSeriesCollectionDirective>
  </AccumulationChartComponent>
  }
};
ReactDOM.render(
  <App />,
  document.getElementById('charts') as HTMLElement
);
<!DOCTYPE html>
<html>

<body> 
     <div id="charts"></div>
</body>

</html>

Learning Resources

UG

Pie Chart User Guide

Learn the available options to customize the React pie chart.

API

Pie Chart API Reference

Explore the React pie chart APIs.


65+ REACT UI COMPONENTS

Scroll up icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon