- Angular Highcharts Tutorial
- Angular Highcharts - Home
- Angular Highcharts - Overview
- Environment Setup
- Configuration Syntax
- Angular Highcharts - Line Charts
- Angular Highcharts - Area Charts
- Angular Highcharts - Bar Charts
- Angular Highcharts - Column Charts
- Angular Highcharts - Pie Charts
- Angular Highcharts - Scatter Chart
- Angular Highcharts - Dynamic Charts
- Angular Highcharts - Combinations
- Angular Highcharts - 3D Charts
- Angular Highcharts - Map Charts
- Angular Highcharts Resources
- Angular Highcharts - Quick Guide
- Angular Highcharts - Resources
- Angular Highcharts - Discussion
Angular Highcharts - 3D Pie Chart
Following is an example of a 3D Pie Chart.
We have already seen the configuration used to draw a chart in Highcharts Configuration Syntax chapter.
An example of a 3D Pie Chart is given below.
Configurations
Let us now see the additional configurations/steps taken.
option3D
Configure the pie chart type to be 3D based. Options3D sets the 3D options enabled.
chart: { options3d: { enabled: true, alpha: 15, beta: 15, depth: 50, viewDistance: 25 } }
Example
app.component.ts
import { Component } from '@angular/core'; import * as Highcharts from 'highcharts'; import highcharts3D from 'highcharts/highcharts-3d.src'; highcharts3D(Highcharts); @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { highcharts = Highcharts; chartOptions = { chart : { type:'pie', options3d: { enabled: true, alpha: 45, beta: 0 } }, title : { text: 'Browser market shares at a specific website, 2014' }, tooltip : { pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' }, plotOptions : { pie: { allowPointSelect: true, cursor: 'pointer', depth: 35, dataLabels: { enabled: true, format: '<b>{point.name}%</b>: {point.percentage:.1f} %', style: { color: (Highcharts.theme && Highcharts.theme.contrastTextColor)|| 'black' } } } }, series : [{ type: 'pie', name: 'Browser share', data: [ ['Firefox', 45.0], ['IE', 26.8], { name: 'Chrome', y: 12.8, sliced: true, selected: true }, ['Safari', 8.5], ['Opera', 6.2], ['Others', 0.7] ] }] }; }
Result
Verify the result.
Printangular_highcharts_3d_charts.htm
Advertisements