Angular Pie Chart is a circular graphic, which is ideal for displaying proportional values between different categories.
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.
Customize the radius of the pie to change the look and functionality of the chart.
Customize the start and end angles of the chart to achieve the semi-pie.
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.
Arranges data labels smartly to avoid overlapping when the data point values fall in close range.
Group the points in pie chart based on certain conditions. The grouped slices can be split into individual points by clicking the slice.
Focus-in on the data within the data using drilldown operation.
Customize the radius of individual slice using built-in APIs.
Move the center of the pie relative to the plot area.
Customize the look and feel of the pie using built-in APIs.
<ejs-accumulationchart id="chart-container">
<e-accumulation-series-collection>
<e-accumulation-series [dataSource]='data' xName='x' yName='y' type='Pie'></e-accumulation-series>
</e-accumulation-series-collection>
</ejs-accumulationchart>
//app.component.ts
import { Component } from '@angular/core';
export class AppComponent {
public data: Object[] = [
{ x: 'JPN', text: 'Japan', y: 5156 },
{ x: 'DEU', text: 'Germany', y: 3754 },
{ x: 'FRA', text: 'France', y: 2809 },
{ x: 'GBR', text: 'UK', y: 2721 },
{ x: 'BRA', text: 'Brazil', y: 2472 },
{ x: 'RUS', text: 'Russia', y: 2231 },
{ x: 'ITA', text: 'Italy', y: 2131 },
{ x: 'IND', text: 'India', y: 1857 },
];
}
//app.module.ts
import { AccumulationChartModule } from '@syncfusion/ej2-ng-charts';
import { PieSeriesService} from '@syncfusion/ej2-ng-charts';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule, AccumulationChartModule
],
providers: [PieSeriesService],
bootstrap: [AppComponent]
})
export class AppModule { }