Loading...
Loading...
Implement interactive 3D circular charts in Angular applications using Syncfusion. Covers pie and donut chart creation, data binding, data labels with positioning and templates, empty points handling, tooltips with custom formatting, legend configuration, titles and subtitles, and print/export functionality (PNG, SVG, PDF). Use this skill when creating 3D circular visualizations for data representation, comparison, and interactive user engagement.
npx skill4agent add syncfusion/angular-ui-components-skills syncfusion-angular-circular-3d-chartimport { Component } from '@angular/core';
import { CircularChart3DComponent, CircularChartSeriesCollectionDirective, CircularChartSeriesDirective } from '@syncfusion/ej2-angular-charts';
@Component({
selector: 'app-root',
standalone: true,
imports: [CircularChart3DComponent, CircularChartSeriesCollectionDirective, CircularChartSeriesDirective],
template: `
<ejs-circularchart3d id="container" [tooltip]="{ enable: true }">
<e-circularchart3d-series-collection>
<e-circularchart3d-series [dataSource]="chartData" xName="x" yName="y" type="Pie">
</e-circularchart3d-series>
</e-circularchart3d-series-collection>
</ejs-circularchart3d>
`
})
export class AppComponent {
chartData = [
{ x: 'Product A', y: 25 },
{ x: 'Product B', y: 20 },
{ x: 'Product C', y: 30 },
{ x: 'Product D', y: 25 }
];
}@Component({
template: `
<ejs-circularchart3d>
<e-circularchart3d-series-collection>
<e-circularchart3d-series
[dataSource]="data"
xName="name"
yName="value"
type="Pie"
[dataLabel]="{ visible: true, position: 'Outside', name: 'x' }">
</e-circularchart3d-series>
</e-circularchart3d-series-collection>
</ejs-circularchart3d>
`
})
export class PieChartComponent {
data = [
{ name: 'Sales', value: 40 },
{ name: 'Marketing', value: 30 },
{ name: 'Support', value: 20 },
{ name: 'Operations', value: 10 }
];
}export class DonutChartComponent {
@ViewChild('chart')
public chart!: CircularChart3DComponent;
data = [
{ x: 'Chrome', y: 45, color: '#5DADE2' },
{ x: 'Firefox', y: 25, color: '#F39C12' },
{ x: 'Safari', y: 20, color: '#48C9B0' },
{ x: 'Edge', y: 10, color: '#E74C3C' }
];
seriesSettings = {
dataSource: this.data,
xName: 'x',
yName: 'y',
pointColorMapping: 'color',
innerRadius: '50%',
type: 'Pie'
};
tooltipSettings = {
enable: true,
format: '${point.x}: ${point.y}%'
};
legendSettings = {
visible: true,
position: 'Bottom'
};
}export class CustomLabelChartComponent {
data = [
{ category: 'Jan', sales: 35 },
{ category: 'Feb', sales: 28 },
{ category: 'Mar', sales: 34 }
];
dataLabelTemplate = '<div>${point.x}: ${point.y}K</div>';
dataLabelSettings = {
visible: true,
template: this.dataLabelTemplate,
position: 'Outside'
};
}| Prop | Type | Purpose |
|---|---|---|
| string | Chart type: 'Pie' or 'Donut' |
| any[] | Array of data objects for chart |
| string | Data property for category/label |
| string | Data property for values |
| string | Donut hole size (0-100%, Pie: 0%, Donut: 40-60%) |
| string | Chart radius (default: 80% of min width/height) |
| string | Data property for point colors |
| DataLabelSettings | Label configuration (visible, position, template) |
| TooltipSettings | Tooltip settings (enable, format, template, header) |
| LegendSettings | Legend position and behavior |
| string | Chart title text |
| string | Chart subtitle text |
| boolean | Auto-arrange labels to avoid overlap (default: true) |
| EmptyPointSettings | Handle missing data points |