Angular Google Charts - 3D Pie Chart



Following is an example of a 3D Pie Chart.

We have already seen the configurations used to draw a chart in Google Charts Configuration Syntax chapter. Now, let us see an example of a 3D Pie Chart.

Configurations

We've used is3D configuration to show a 3D Pie Chart.

options = {    
   is3D:true
};

Example - Usage of 3D Pie Chart

app.ts

import { Component, signal } from '@angular/core';
import { ChartType, GoogleChart } from 'angular-google-charts';

@Component({
   selector: 'app-root',
   imports: [GoogleChart],
   templateUrl: './app.html',
   styleUrl: './app.css'
})
export class App {
   protected readonly title = signal('google-charts-app');
   type = ChartType.PieChart;
   data = [
      ['Firefox', 45.0],
      ['IE', 26.8],
      ['Chrome', 12.8],
      ['Safari', 8.5],
      ['Opera', 6.2],
      ['Others', 0.7] 
   ];
   columnNames = ['Browser', 'Percentage'];
   options = {  
      title: 'Browser market shares at a specific website, 2014',
	  is3D: true
   };
   width = 550;
   height = 400;
}

Result

Verify the result.

3D Pie Chart
angular_googlecharts_pie_charts.htm
Advertisements